Permalink
Browse files

prevent dialogs re-using initial ui state from going back

  • Loading branch information...
johnbender committed Nov 27, 2012
1 parent df6af7e commit 8ee43189aeea929ba1765aa32a655472af32e47a
Showing with 4 additions and 1 deletion.
  1. +4 −1 js/widgets/dialog.js
View
@@ -88,7 +88,10 @@ $.widget( "mobile.dialog", $.mobile.widget, {
if ( this._isCloseable ) {
this._isCloseable = false;
if ( $.mobile.hashListeningEnabled ) {
// If the hash listening is enabled and there is at least one preceding history
// entry it's ok to go back. Initial pages with the dialog hash state are an example
// where the stack check is necessary
if ( $.mobile.hashListeningEnabled && $.mobile.urlHistory.stack.length > 1 ) {
$.mobile.back();
} else {
dst = $.mobile.urlHistory.getActive().url;

0 comments on commit 8ee4318

Please sign in to comment.