From b8cf201a88e129db898a400a8cdc85c0b7111d73 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Thu, 21 Oct 2010 13:16:48 -0400 Subject: [PATCH] ajaxClick only updates the hash if the clicked element doesn't match the new unHashedSelectors var. So far, this only includes [data-rel=dialog] --- js/jquery.mobile.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/js/jquery.mobile.js b/js/jquery.mobile.js index 18998446..5ff0707b 100644 --- a/js/jquery.mobile.js +++ b/js/jquery.mobile.js @@ -58,7 +58,8 @@ } ], focusable = "[tabindex],a,button:visible,select:visible,input", nextPageRole = null, - preventLoad = false; + preventLoad = false, + unHashedSelectors = '[data-rel=dialog]'; // TODO: don't expose (temporary during code reorg) $.mobile.urlStack = urlStack; @@ -129,8 +130,13 @@ location = href } else{ - // let the hashchange event handler take care of requesting the page via ajax - location.hash = href; + changePage(href, pageTransition); + + if( !$(this).is(unHashedSelectors) ){ + // let the hashchange event handler take care of requesting the page via ajax + location.hash = href; + } + } return this; };