Skip to content
Permalink
Browse files

Dialog: Fixed #3013: Force dialog titlebars to have a full line heigh…

…t when no title is provided (after initialization).
  • Loading branch information
scottgonzalez committed Jul 12, 2008
1 parent 3bc322f commit ac6189fd5758e8c98c40d4fc1274cb4202b35cb5
Showing with 3 additions and 3 deletions.
  1. +2 −2 tests/dialog.js
  2. +1 −1 ui/ui.dialog.js
@@ -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(), "&nbsp;", "[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 || '&nbsp;');
break;
case "width":
this.uiDialog.width(value);

0 comments on commit ac6189f

Please sign in to comment.
You can’t perform that action at this time.