Permalink
Browse files

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

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

This comment has been minimized.

Show comment
Hide comment
@johnbender

johnbender Sep 7, 2012

Contributor

@gabrielschulhof

I think this breaks popups without history :(

Contributor

johnbender replied Sep 7, 2012

@gabrielschulhof

I think this breaks popups without history :(

@johnbender

This comment has been minimized.

Show comment
Hide comment
@johnbender

johnbender Sep 7, 2012

Contributor

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)

Contributor

johnbender replied Sep 7, 2012

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.