From 9da71a49841d6235b48b84f2fce8bfcce0962c2f Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Wed, 17 Jul 2013 12:09:54 +0300 Subject: [PATCH] Popup: Do not proceed with _closePopup() if the popup is no longer the currently-open one. Fixes #6182. --- js/widgets/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/widgets/popup.js b/js/widgets/popup.js index 276232abbfa..3780359d4ff 100644 --- a/js/widgets/popup.js +++ b/js/widgets/popup.js @@ -758,7 +758,7 @@ $.widget( "mobile.popup", { _closePopup: function( evt, data ) { var parsedDst, toUrl, opts = this.options, immediate = false; - if ( evt && evt.isDefaultPrevented() ) { + if ( ( evt && evt.isDefaultPrevented() ) || $.mobile.popup.active !== this ) { return; }