From 240505a4338ae8c94e7c3e1e730bc5220060c4b1 Mon Sep 17 00:00:00 2001 From: Josh Dean Date: Mon, 16 Jan 2012 18:23:49 -0600 Subject: [PATCH] Fix to #3351, dialogs reopening when attempting to close them --- js/jquery.mobile.dialog.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/jquery.mobile.dialog.js b/js/jquery.mobile.dialog.js index 123288e6..904eeecd 100644 --- a/js/jquery.mobile.dialog.js +++ b/js/jquery.mobile.dialog.js @@ -39,7 +39,10 @@ $.widget( "mobile.dialog", $.mobile.widget, { // this must be an anonymous function so that select menu dialogs can replace // the close method. This is a change from previously just defining data-rel=back // on the button and letting nav handle it - headerCloseButton.bind( "vclick", function() { + // + // 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() { self.close(); });