Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Commit 6e1eee7

Browse files
author
Gabriel Schulhof
committed
Popup: Make it work as a widget on its own. Fixes #5742.
1 parent 58e94db commit 6e1eee7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/widgets/popup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ define( [
219219

220220
// define the container for navigation event bindings
221221
// TODO this would be nice at the the mobile widget level
222-
this.options.container = this.options.container || $.mobile.pageContainer;
222+
this.options.container = this.options.container || $.mobile.pageContainer || thisPage;
223223

224224
// Apply the proto
225225
thisPage.append( ui.screen );
@@ -846,7 +846,7 @@ define( [
846846
}
847847

848848
// swallow the the initial navigation event, and bind for the next
849-
$(window).one( "beforenavigate", function( e ) {
849+
$.mobile.window.one( "beforenavigate", function( e ) {
850850
e.preventDefault();
851851
self._open( options );
852852
self._bindContainerClose();

0 commit comments

Comments
 (0)