Skip to content

Instantly share code, notes, and snippets.

@gabrielschulhof
Created July 26, 2012 18:37
Show Gist options
  • Save gabrielschulhof/3183692 to your computer and use it in GitHub Desktop.
Save gabrielschulhof/3183692 to your computer and use it in GitHub Desktop.
diff --git a/js/widgets/dialog.js b/js/widgets/dialog.js
index ec8f825..d2a0e77 100644
--- a/js/widgets/dialog.js
+++ b/js/widgets/dialog.js
@@ -67,8 +67,10 @@ $.widget( "mobile.dialog", $.mobile.widget, {
.attr( "data-" + $.mobile.ns + "direction", "reverse" );
}
})
- .bind( "pagehide", function( e, ui ) {
+ .bind( "pagebeforeshow", function( e ) {
self._isClosed = false;
+ },
+ .bind( "pagehide", function( e, ui ) {
$( this ).find( "." + $.mobile.activeBtnClass ).not( ".ui-slider-bg" ).removeClass( $.mobile.activeBtnClass );
})
// Override the theme set by the page plugin on pageshow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment