From ac6189fd5758e8c98c40d4fc1274cb4202b35cb5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 12 Jul 2008 00:14:19 +0000 Subject: [PATCH] Dialog: Fixed #3013: Force dialog titlebars to have a full line height when no title is provided (after initialization). --- tests/dialog.js | 4 ++-- ui/ui.dialog.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/dialog.js b/tests/dialog.js index 56be158b6..5cd1f1250 100644 --- a/tests/dialog.js +++ b/tests/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 = $('
').dialog(); equals(titleText(), "", "[default]"); el.remove(); + el = $('
').dialog(); equals(titleText(), " ", "[default]"); el.remove(); el = $('
').dialog(); equals(titleText(), "foo", "title in element attribute"); el.remove(); el = $('
').dialog({ title: 'foo' }); equals(titleText(), "foo", "title in init options"); el.remove(); el = $('
').dialog({ title: 'bar' }); equals(titleText(), "bar", "title in init options should override title in element attribute"); el.remove(); diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 72091e89d..42a06daa5 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -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); -- 2.39.5