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

Commit

Permalink
Dialog: Append close button to first found header to prevent a close …
Browse files Browse the repository at this point in the history
…button being added to popup on same page as well. Fixes #5382.
  • Loading branch information
jaspermdegroot committed Dec 16, 2012
1 parent 41cc858 commit 0e140f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/widgets/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ $.widget( "mobile.dialog", $.mobile.widget, {
// Sanitize value
location = ( value === "left" ? "left" : "right" );
btn = $( "<a href='#' class='ui-btn-" + location + "' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" );
this.element.children().find( ":jqmData(role='header')" ).prepend( btn );
this.element.children().find( ":jqmData(role='header')" ).first().prepend( btn );
if ( this._createComplete && $.fn.buttonMarkup ) {
btn.buttonMarkup();
}
Expand Down

0 comments on commit 0e140f9

Please sign in to comment.