moved global hashchange disable check above dialog check

This commit is contained in:
John Bender 2011-03-07 17:23:44 -08:00
parent c9416a09a7
commit 150f0f6c17

View file

@ -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 );