aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2008-07-12 00:14:19 +0000
committerScott González <scott.gonzalez@gmail.com>2008-07-12 00:14:19 +0000
commitac6189fd5758e8c98c40d4fc1274cb4202b35cb5 (patch)
treec53280f7812fefbdec0ac21e665f29993022bb68
parent3bc322fd375e5f26c39d9620a64e0788f18acef5 (diff)
downloadjquery-ui-ac6189fd5758e8c98c40d4fc1274cb4202b35cb5.tar.gz
jquery-ui-ac6189fd5758e8c98c40d4fc1274cb4202b35cb5.zip
Dialog: Fixed #3013: Force dialog titlebars to have a full line height when no title is provided (after initialization).
-rw-r--r--tests/dialog.js4
-rw-r--r--ui/ui.dialog.js2
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 = $('<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();
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 || '&nbsp;');
break;
case "width":
this.uiDialog.width(value);