Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[popup] Perform the visual open only when the nav hook has been acqui…

…red -- Fixes #4949
  • Loading branch information...
commit 3b40d0374c11ccae31ada39e5813927abb2376f9 1 parent e740c15
@gabrielschulhof gabrielschulhof authored
Showing with 5 additions and 4 deletions.
  1. +5 −4 js/widgets/popup.js
View
9 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 :(

2 comments on commit 3b40d03

@johnbender

@gabrielschulhof

I think this breaks popups without history :(

@johnbender

We have to take another look at this, I wrote some poor tests for the "historyless" popups and this change breaks them (obviously without failing the tests)

Please sign in to comment.
Something went wrong with that request. Please try again.