Dialog: Properly handle empty title with jQuery git

jQuery now returns `null` for empty attributes instead of `undefined`.

Ref gh-1516

(cherry picked from commit fdbb85be39)
This commit is contained in:
Scott González 2015-03-23 18:37:47 -04:00
parent 1ca46175d5
commit 6d9194ac11

View File

@ -107,7 +107,9 @@ return $.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();
@ -422,10 +424,11 @@ return $.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() {