From 9ed13f86c897ddc0b07189d0447a2ed114919a6b Mon Sep 17 00:00:00 2001 From: scottjehl Date: Tue, 25 Jan 2011 22:39:29 -0500 Subject: [PATCH] hashchange event handler should still load the first url, even if Ajax is disabled. Fixes #879 --- js/jquery.mobile.navigation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index c4703ab1..5a26bc10 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -616,10 +616,10 @@ //hashchange event handler $window.bind( "hashchange", function(e, triggered) { - if( !urlHistory.listeningEnabled || !$.mobile.ajaxEnabled || + if( !triggered && ( !urlHistory.listeningEnabled || !$.mobile.ajaxEnabled || // TODO: deprecated - remove at 1.0 // only links need to be checked here, as forms don't trigger a hashchange event (they just silently update the hash) - ( !$.mobile.ajaxLinksEnabled ) ){ + !$.mobile.ajaxLinksEnabled ) ){ return; }