From 150f0f6c177de4f85439400514105900f47cf72a Mon Sep 17 00:00:00 2001 From: John Bender Date: Mon, 7 Mar 2011 17:23:44 -0800 Subject: [PATCH] moved global hashchange disable check above dialog check --- js/jquery.mobile.navigation.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 0366e875..43b8b4dd 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -727,6 +727,14 @@ transition = $.mobile.urlHistory.stack.length === 0 ? false : undefined, back , forward, newActiveIndex; + //if listening is disabled (either globally or temporarily), or it's a dialog hash + if( !$.mobile.hashListeningEnabled || !urlHistory.ignoreNextHashChange ){ + if( !urlHistory.ignoreNextHashChange ){ + urlHistory.ignoreNextHashChange = true; + } + + return; + } // special case for dialogs requires heading back or forward until we find a non dialog page if( urlHistory.stack.length > 1 && @@ -744,15 +752,6 @@ return; } - //if listening is disabled (either globally or temporarily), or it's a dialog hash - if( !$.mobile.hashListeningEnabled || !urlHistory.ignoreNextHashChange ){ - if( !urlHistory.ignoreNextHashChange ){ - urlHistory.ignoreNextHashChange = true; - } - - return; - } - //if to is defined, load it if ( to ){ $.mobile.changePage( to, transition, undefined, false, true );