mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Dialog: Fixed #3013: Force dialog titlebars to have a full line height when no title is provided (after initialization).
This commit is contained in:
parent
3bc322fd37
commit
ac6189fd57
@ -376,9 +376,9 @@ test("stack", function() {
|
||||
test("title", function() {
|
||||
expect(4);
|
||||
function titleText() {
|
||||
return dlg().find(".ui-dialog-title").text();
|
||||
return dlg().find(".ui-dialog-title").html();
|
||||
}
|
||||
el = $('<div/>').dialog(); equals(titleText(), "", "[default]"); el.remove();
|
||||
el = $('<div/>').dialog(); equals(titleText(), " ", "[default]"); el.remove();
|
||||
el = $('<div title="foo"/>').dialog(); equals(titleText(), "foo", "title in element attribute"); el.remove();
|
||||
el = $('<div/>').dialog({ title: 'foo' }); equals(titleText(), "foo", "title in init options"); el.remove();
|
||||
el = $('<div title="foo"/>').dialog({ title: 'bar' }); equals(titleText(), "bar", "title in init options should override title in element attribute"); el.remove();
|
||||
|
@ -184,7 +184,7 @@ $.widget("ui.dialog", {
|
||||
this.uiDialog.resizable(value ? 'enable' : 'disable');
|
||||
break;
|
||||
case "title":
|
||||
$(".ui-dialog-title", this.uiDialogTitlebar).text(value);
|
||||
$(".ui-dialog-title", this.uiDialogTitlebar).html(value || ' ');
|
||||
break;
|
||||
case "width":
|
||||
this.uiDialog.width(value);
|
||||
|
Loading…
Reference in New Issue
Block a user