Skip to content
This repository
Browse code

Fix for issue #1405: Moved assignment of $activeClickedLink to the vc…

…lick handler in charge of adding the active state
  • Loading branch information...
commit 9f3836e7b19b65eae5c9213018211834a910a25a 1 parent d55b225
Ghislain Seguin authored August 17, 2011

Showing 1 changed file with 2 additions and 3 deletions. Show diff stats Hide diff stats

  1. 5  js/jquery.mobile.navigation.js
5  js/jquery.mobile.navigation.js
@@ -1068,7 +1068,8 @@
1068 1068
 			var link = findClosestLink( event.target );
1069 1069
 			if ( link ) {
1070 1070
 				if ( path.parseUrl( link.getAttribute( "href" ) || "#" ).hash !== "#" ) {
1071  
-					$( link ).closest( ".ui-btn" ).not( ".ui-disabled" ).addClass( $.mobile.activeBtnClass );
  1071
+					$activeClickedLink = $( link ).closest( ".ui-btn" ).not( ".ui-disabled" );
  1072
+					$activeClickedLink.addClass( $.mobile.activeBtnClass );
1072 1073
 					$( "." + $.mobile.activePageClass + " .ui-btn" ).not( link ).blur();
1073 1074
 				}
1074 1075
 			}
@@ -1146,8 +1147,6 @@
1146 1147
 				//     moved into more comprehensive isExternalLink
1147 1148
 				isExternal = useDefaultUrlHandling || ( path.isExternal( href ) && !isCrossDomainPageLoad );
1148 1149
 
1149  
-			$activeClickedLink = $link.closest( ".ui-btn" );
1150  
-
1151 1150
 			if( isExternal ) {
1152 1151
 				httpCleanup();
1153 1152
 				//use default click handling

0 notes on commit 9f3836e

Please sign in to comment.
Something went wrong with that request. Please try again.