1

After searching Stackoverflow and Google, I have not found a working solution.

I need a web app to remain in standalone mode when changing pages (clicking links). Currently, when any links are clicked while in standalone mode, they are launched in a new window in Safari, and exits standalone mode.

How can I prevent links from opening a new window so that it remains in standalone mode.

This piece of code is tested and does not work:

$('a').click(function(e){
    e.preventDefault();
    window.location = $(this).attr('href');
});

It seems as though this is being circumvented by Safari while in standalone mode, preventing this from working. Is there a new work-around?

This app is being presented tomorrow, so PhoneGap is not an option; are there any others?

4

1 に答える 1

1

return false;クリッククロージャーを追加する必要があると思います。

この投稿を確認してください。iPhone Safari Web App は新しいウィンドウでリンクを開きます

于 2011-12-05T22:50:22.660 に答える