From f4f269bb766e219c4a6df8e6dd9423f0c7dbfe9f Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Fri, 7 Sep 2012 22:19:55 +0300 Subject: [PATCH] Revert "Revert "[popup] Perform the visual open only when the nav hook has been acquired -- Fixes #4949"" This reverts commit 7c98460a28e3f7d6b6359e51ce3b10de8c3c6218. --- js/widgets/popup.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/widgets/popup.js b/js/widgets/popup.js index e6b99864378..91fb757aa5b 100644 --- a/js/widgets/popup.js +++ b/js/widgets/popup.js @@ -514,8 +514,6 @@ define( [ "jquery", } return false; }()); - // set the global popup mutex - $.mobile.popup.active = this; // Make sure options is defined options = ( options || {} ); @@ -680,8 +678,8 @@ define( [ "jquery", return; } - // forward the options on to the visual open - self._open( options ); + // set the global popup mutex + $.mobile.popup.active = this; // if history alteration is disabled close on navigate events // and leave the url as is @@ -723,6 +721,9 @@ define( [ "jquery", opts.container.one( opts.navigateEvents, function( e ) { e.preventDefault(); self._bindContainerClose(); + + // forward the options on to the visual open + self._open( options ); }); // Gotta love methods with 1mm args :(