Permalink
Browse files

Popup: Make it work as a widget on its own. Fixes #5742.

  • Loading branch information...
gabrielschulhof committed Mar 10, 2013
1 parent 58e94db commit 6e1eee7b6383f981b159be6b0ec641f40f5a0ece
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/widgets/popup.js
View
@@ -219,7 +219,7 @@ define( [
// define the container for navigation event bindings
// TODO this would be nice at the the mobile widget level
- this.options.container = this.options.container || $.mobile.pageContainer;
+ this.options.container = this.options.container || $.mobile.pageContainer || thisPage;
// Apply the proto
thisPage.append( ui.screen );
@@ -846,7 +846,7 @@ define( [
}
// swallow the the initial navigation event, and bind for the next
- $(window).one( "beforenavigate", function( e ) {
+ $.mobile.window.one( "beforenavigate", function( e ) {
e.preventDefault();
self._open( options );
self._bindContainerClose();

0 comments on commit 6e1eee7

Please sign in to comment.