File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -646,10 +646,7 @@ define( [ "jquery",
646646 } ) ;
647647 } ,
648648
649- _destroy : function ( ) {
650- // hide and remove bindings
651- this . _close ( ) ;
652-
649+ _unenhance : function ( ) {
653650 // Put the element back to where the placeholder was and remove the "ui-popup" class
654651 this . _setTheme ( "none" ) ;
655652 this . element
@@ -660,6 +657,15 @@ define( [ "jquery",
660657 this . _ui . placeholder . remove ( ) ;
661658 } ,
662659
660+ _destroy : function ( ) {
661+ if ( $ . mobile . popup . active === this ) {
662+ this . element . one ( "popupafterclose" , $ . proxy ( this , "_unenhance" ) ) ;
663+ this . close ( ) ;
664+ } else {
665+ this . _unenhance ( ) ;
666+ }
667+ } ,
668+
663669 // any navigation event after a popup is opened should close the popup
664670 // NOTE the pagebeforechange is bound to catch navigation events that don't
665671 // alter the url (eg, dialogs from popups)
You can’t perform that action at this time.
0 commit comments