mercredi 7 octobre 2015

iOS 9 Safari Web App links open in Safari

I have a mobile web app capable safari app for iPhone running on iOS 9. There's only one problem: the fix for opening links IN the mobile web app, doesn't seem to work anymore.

I have this code as a fix:

<script type="text/javascript">
$('a').click(function() {
    if(!$(this).hasClass('noeffect')) {
        window.location = $(this).attr('href');
        return false;
    }
});
</script>

But still my links are opening in a separate safari window, in stead of in the web app itself.

Working demo can be seen at: http://ift.tt/1WNCgM5, when you hit the "Toevoegen"-dashed box, you'll see what happens when you added the page to your homescreen.

Thanks in advance




Aucun commentaire:

Enregistrer un commentaire