Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
prevent dialogs re-using initial ui state from going back
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Nov 27, 2012
1 parent df6af7e commit 8ee4318
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/widgets/dialog.js
Expand Up @@ -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;
Expand Down

0 comments on commit 8ee4318

Please sign in to comment.