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

Commit

Permalink
Dialog: Render un-closeable during pagebeforehide. Fixes #5956.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed May 2, 2013
1 parent b070b64 commit ae059a1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/widgets/dialog.js
Expand Up @@ -27,6 +27,10 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
}
},

_handlePageBeforeHide: function() {
this._isCloseable = false;
},

_create: function() {
var $el = this.element,
cornerClass = !!this.options.corners ? " ui-corner-all" : "",
Expand Down Expand Up @@ -60,7 +64,8 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
});

this._on( $el, {
pagebeforeshow: "_handlePageBeforeShow"
pagebeforeshow: "_handlePageBeforeShow",
pagebeforehide: "_handlePageBeforeHide"
});

this._setCloseBtn( this.options.closeBtn );
Expand Down

0 comments on commit ae059a1

Please sign in to comment.