Skip to content
This repository
Browse code

[dialog] When hashListeningEnabled is not set, use urlHistory to go b…

…ack from the dialog - Fixes: #4320
  • Loading branch information...
commit d5b04ac77b0119463ff5378e45b8fcceffdf74d9 1 parent 62cd010
Gabriel "_|Nix|_" Schulhof authored
2  docs/pages/dialog.html
@@ -31,4 +31,4 @@
31 31
 
32 32
 
33 33
 </body>
34  
-</html>
  34
+</html>
7  js/jquery.mobile.dialog.js
@@ -84,7 +84,12 @@ $.widget( "mobile.dialog", $.mobile.widget, {
84 84
 	close: function() {
85 85
 		if ( !this._isClosed ) {
86 86
 			this._isClosed = true;
87  
-			window.history.back();
  87
+			if ( $.mobile.hashListeningEnabled ) {
  88
+				window.history.back();
  89
+			}
  90
+			else {
  91
+				$.mobile.changePage( $.mobile.urlHistory.getPrev().url );
  92
+			}
88 93
 		}
89 94
 	}
90 95
 });

0 notes on commit d5b04ac

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