From 702e89f034b664750ec7587f44499fb97c12e845 Mon Sep 17 00:00:00 2001 From: Nabil Saleh Date: Mon, 18 Apr 2011 15:01:31 +0200 Subject: [PATCH] fix for Issue #1425 - active state was not removed from buttons when they where not used for pagenavigation --- js/jquery.mobile.navigation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 614f360d..89344381 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -772,15 +772,16 @@ return false; } + $activeClickedLink = $this.closest( ".ui-btn" ); //prevent # urls from bubbling //path.get() is replaced to combat abs url prefixing in IE if( url.replace(path.get(), "") == "#" ){ //for links created purely for interaction - ignore event.preventDefault(); + window.setTimeout(function() {removeActiveLinkClass(true);}, 200); return; } - $activeClickedLink = $this.closest( ".ui-btn" ); if( isExternal || hasAjaxDisabled || hasTarget || !$.mobile.ajaxEnabled || // TODO: deprecated - remove at 1.0