mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Properly handle empty title with jQuery git
jQuery now returns `null` for empty attributes instead of `undefined`. Ref gh-1516
This commit is contained in:
parent
e4363ab82d
commit
fdbb85be39
@ -118,7 +118,9 @@ $.widget( "ui.dialog", {
|
||||
index: this.element.parent().children().index( this.element )
|
||||
};
|
||||
this.originalTitle = this.element.attr( "title" );
|
||||
this.options.title = this.options.title || this.originalTitle;
|
||||
if ( this.options.title == null && this.originalTitle != null ) {
|
||||
this.options.title = this.originalTitle;
|
||||
}
|
||||
|
||||
this._createWrapper();
|
||||
|
||||
@ -433,10 +435,11 @@ $.widget( "ui.dialog", {
|
||||
},
|
||||
|
||||
_title: function( title ) {
|
||||
if ( !this.options.title ) {
|
||||
if ( this.options.title ) {
|
||||
title.text( this.options.title );
|
||||
} else {
|
||||
title.html( " " );
|
||||
}
|
||||
title.text( this.options.title );
|
||||
},
|
||||
|
||||
_createButtonPane: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user