Dialog closes directly after open
问题 I want to show a dialog when an app is not in standalone mode. I have this code: $(document).on("pageinit", "#home", function (e) { console.log('pageinit'); if (!window.navigator.standalone && (navigator.userAgent.match(/iPhone/i) || navigator.userAgent.match(/iPod/i))) { $.mobile.changePage('/mobile/install', { role: 'dialog', showLoadMsg: true, changeHash: false }); } }); The problem is that the dialog appears but close directly after and it returns to homepage. The pageshow event for