Skip to content

Commit 9e847cd

Browse files
author
Gabriel Schulhof
committed
Dialog: Do call buttonMarkup during _create.
1 parent b90361b commit 9e847cd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

js/widgets/dialog.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
6363
pagebeforeshow: "_handlePageBeforeShow"
6464
});
6565

66-
$.extend( this, {
67-
_createComplete: false
68-
});
69-
7066
this._setCloseBtn( this.options.closeBtn );
7167
},
7268

@@ -101,10 +97,9 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
10197
location = ( value === "left" ? "left" : "right" );
10298
btn = $( "<a href='#' class='ui-btn-" + location + "' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" );
10399
this.element.children().find( ":jqmData(role='header')" ).first().prepend( btn );
104-
if ( this._createComplete && $.fn.buttonMarkup ) {
100+
if ( $.fn.buttonMarkup ) {
105101
btn.buttonMarkup();
106102
}
107-
this._createComplete = true;
108103

109104
// this must be an anonymous function so that select menu dialogs can replace
110105
// the close method. This is a change from previously just defining data-rel=back

0 commit comments

Comments
 (0)