Permalink
Browse files

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

…ack from the dialog - Fixes: #4320
  • Loading branch information...
gabrielschulhof committed May 16, 2012
1 parent 62cd010 commit d5b04ac77b0119463ff5378e45b8fcceffdf74d9
Showing with 7 additions and 2 deletions.
  1. +1 −1 docs/pages/dialog.html
  2. +6 −1 js/jquery.mobile.dialog.js
View
@@ -31,4 +31,4 @@ <h1>Delete page?</h1>
</body>
-</html>
+</html>
@@ -84,7 +84,12 @@ $.widget( "mobile.dialog", $.mobile.widget, {
close: function() {
if ( !this._isClosed ) {
this._isClosed = true;
- window.history.back();
+ if ( $.mobile.hashListeningEnabled ) {
+ window.history.back();
+ }
+ else {
+ $.mobile.changePage( $.mobile.urlHistory.getPrev().url );
+ }
}
}
});

0 comments on commit d5b04ac

Please sign in to comment.