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() {
|
test("title", function() {
|
||||||
expect(4);
|
expect(4);
|
||||||
function titleText() {
|
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 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/>').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();
|
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');
|
this.uiDialog.resizable(value ? 'enable' : 'disable');
|
||||||
break;
|
break;
|
||||||
case "title":
|
case "title":
|
||||||
$(".ui-dialog-title", this.uiDialogTitlebar).text(value);
|
$(".ui-dialog-title", this.uiDialogTitlebar).html(value || ' ');
|
||||||
break;
|
break;
|
||||||
case "width":
|
case "width":
|
||||||
this.uiDialog.width(value);
|
this.uiDialog.width(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user