Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "[dialog] Prevent the click-handler for "Close" acting twice -…

… Fixes: #3387"

This reverts commit fbcc0e4.
  • Loading branch information...
commit fdee13f8796a44e6a58d86753f3dd47b36960511 1 parent 10f6c5a
Gabriel "_|Nix|_" Schulhof gabrielschulhof authored
Showing with 1 addition and 6 deletions.
  1. +1 −6 js/jquery.mobile.dialog.js
7 js/jquery.mobile.dialog.js
View
@@ -18,7 +18,6 @@ $.widget( "mobile.dialog", $.mobile.widget, {
var self = this,
$el = this.element,
headerCloseButton = $( "<a href='#' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" ),
- closeButtonNotYetClicked = true,
dialogWrap = $("<div/>", {
"role" : "dialog",
"class" : "ui-dialog-contain ui-corner-all ui-overlay-shadow"
@@ -47,10 +46,7 @@ $.widget( "mobile.dialog", $.mobile.widget, {
// Use click rather than vclick in order to prevent the possibility of unintentionally
// reopening the dialog if the dialog opening item was directly under the close button.
headerCloseButton.bind( "click", function() {
- if ( closeButtonNotYetClicked ) {
- closeButtonNotYetClicked = false;
- self.close();
- }
+ self.close();
});
/* bind events
@@ -72,7 +68,6 @@ $.widget( "mobile.dialog", $.mobile.widget, {
})
.bind( "pagehide", function( e, ui ) {
$( this ).find( "." + $.mobile.activeBtnClass ).removeClass( $.mobile.activeBtnClass );
- closeButtonNotYetClicked = true;
})
// Override the theme set by the page plugin on pageshow
.bind( "pagebeforeshow", function(){
Please sign in to comment.
Something went wrong with that request. Please try again.