aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);