diff --git a/js/BoxPage.js b/js/BoxPage.js index 5693530..6ec6573 100644 --- a/js/BoxPage.js +++ b/js/BoxPage.js @@ -52,7 +52,7 @@ _networkAPI.init(boxURL); retrieveNetworkStatus(); }); - $.mobile.document.on( "pagehide", PAGE_ID, function( event, data ) { + $.mobile.document.on( "pagebeforehide", PAGE_ID, function( event, data ) { clearTimeout(_retryRetrieveStatusDelay); }); diff --git a/js/BoxesPage.js b/js/BoxesPage.js index 980cf24..0644db8 100644 --- a/js/BoxesPage.js +++ b/js/BoxesPage.js @@ -42,7 +42,7 @@ maxDisplayCount: 0 // do not obey the max display count }*/); }); - $.mobile.document.on( "pagehide", PAGE_ID, function( event, data ) { + $.mobile.document.on( "pagebeforehide", PAGE_ID, function( event, data ) { //console.log("Boxes page pagehide"); _connectAPI.stop(); }); diff --git a/js/ConnectingToNetworkPage.js b/js/ConnectingToNetworkPage.js index c21ab94..c2a3084 100644 --- a/js/ConnectingToNetworkPage.js +++ b/js/ConnectingToNetworkPage.js @@ -52,7 +52,7 @@ _networkAPI.startAutoRefresh(); }); }); - $.mobile.document.on( "pagehide", PAGE_ID, function( event, data ) { + $.mobile.document.on( "pagebeforehide", PAGE_ID, function( event, data ) { console.log("Connecting to network page pagehide"); _networkAPI.stopAutoRefresh(); _connectAPI.stop(); diff --git a/js/JoinNetworkPage.js b/js/JoinNetworkPage.js index dc97b60..ef51dea 100644 --- a/js/JoinNetworkPage.js +++ b/js/JoinNetworkPage.js @@ -35,7 +35,7 @@ _networkAPI.init(boxURL); refreshNetworks(); }); - $.mobile.document.on( "pagehide", PAGE_ID, function( event, data ) { + $.mobile.document.on( "pagebeforehide", PAGE_ID, function( event, data ) { console.log("Join network page pagehide"); clearTimeout(_refreshDelay); }); diff --git a/js/JoinSecuredNetworkPage.js b/js/JoinSecuredNetworkPage.js index 34112cb..ffad9b0 100644 --- a/js/JoinSecuredNetworkPage.js +++ b/js/JoinSecuredNetworkPage.js @@ -42,9 +42,6 @@ }); $.mobile.document.on( "pageshow", PAGE_ID, function( event, data ) { d3d.util.autofocus(_form); - }); - $.mobile.document.on( "pagehide", PAGE_ID, function( event, data ) { - console.log(PAGE_ID+" pagehide"); }); function join(){ console.log("JoinSecuredNetworkPage:submit");