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

Commit ae059a1

Browse files
author
Gabriel Schulhof
committed
Dialog: Render un-closeable during pagebeforehide. Fixes #5956.
1 parent b070b64 commit ae059a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

js/widgets/dialog.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
2727
}
2828
},
2929

30+
_handlePageBeforeHide: function() {
31+
this._isCloseable = false;
32+
},
33+
3034
_create: function() {
3135
var $el = this.element,
3236
cornerClass = !!this.options.corners ? " ui-corner-all" : "",
@@ -60,7 +64,8 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
6064
});
6165

6266
this._on( $el, {
63-
pagebeforeshow: "_handlePageBeforeShow"
67+
pagebeforeshow: "_handlePageBeforeShow",
68+
pagebeforehide: "_handlePageBeforeHide"
6469
});
6570

6671
this._setCloseBtn( this.options.closeBtn );

0 commit comments

Comments
 (0)