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

Commit 0e140f9

Browse files
Dialog: Append close button to first found header to prevent a close button being added to popup on same page as well. Fixes #5382.
1 parent 41cc858 commit 0e140f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/widgets/dialog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ $.widget( "mobile.dialog", $.mobile.widget, {
8686
// Sanitize value
8787
location = ( value === "left" ? "left" : "right" );
8888
btn = $( "<a href='#' class='ui-btn-" + location + "' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" );
89-
this.element.children().find( ":jqmData(role='header')" ).prepend( btn );
89+
this.element.children().find( ":jqmData(role='header')" ).first().prepend( btn );
9090
if ( this._createComplete && $.fn.buttonMarkup ) {
9191
btn.buttonMarkup();
9292
}

0 commit comments

Comments
 (0)