ajaxClick only updates the hash if the clicked element doesn't match the new unHashedSelectors var. So far, this only includes [data-rel=dialog]

This commit is contained in:
scottjehl 2010-10-21 13:16:48 -04:00
parent cb13c2f84a
commit b8cf201a88

View file

@ -58,7 +58,8 @@
} ], } ],
focusable = "[tabindex],a,button:visible,select:visible,input", focusable = "[tabindex],a,button:visible,select:visible,input",
nextPageRole = null, nextPageRole = null,
preventLoad = false; preventLoad = false,
unHashedSelectors = '[data-rel=dialog]';
// TODO: don't expose (temporary during code reorg) // TODO: don't expose (temporary during code reorg)
$.mobile.urlStack = urlStack; $.mobile.urlStack = urlStack;
@ -129,8 +130,13 @@
location = href location = href
} }
else{ else{
// let the hashchange event handler take care of requesting the page via ajax changePage(href, pageTransition);
location.hash = href;
if( !$(this).is(unHashedSelectors) ){
// let the hashchange event handler take care of requesting the page via ajax
location.hash = href;
}
} }
return this; return this;
}; };