Skip to content
This repository
Browse code

Navigation: If the default is prevented on the originalEvent of "navi…

…gate", do not go into _handleHashChange. Fixes #5775.
  • Loading branch information...
commit c6dd725ce183c6de0f21d7b72939792e4a2ff48a 1 parent 320fbba
Gabriel "_|Nix|_" Schulhof authored

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  js/jquery.mobile.navigation.js
8  js/jquery.mobile.navigation.js
@@ -1345,7 +1345,13 @@ define( [
1345 1345
 
1346 1346
 		// TODO roll the logic here into the handleHashChange method
1347 1347
 		$window.bind( "navigate", function( e, data ) {
1348  
-			var url = $.event.special.navigate.originalEventName.indexOf( "hashchange" ) > -1 ? data.state.hash : data.state.url;
  1348
+			var url;
  1349
+
  1350
+			if ( e.originalEvent && e.originalEvent.isDefaultPrevented() ) {
  1351
+				return;
  1352
+			}
  1353
+
  1354
+			url = $.event.special.navigate.originalEventName.indexOf( "hashchange" ) > -1 ? data.state.hash : data.state.url;
1349 1355
 
1350 1356
 			if( !url ) {
1351 1357
 				url = $.mobile.path.parseLocation().hash;

0 notes on commit c6dd725

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