aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2009-09-17 14:56:03 +0000
committerJörn Zaefferer <joern.zaefferer@gmail.com>2009-09-17 14:56:03 +0000
commit20201c28549a318937910ef847ec8be0ed6a3179 (patch)
tree175c8af0858bde17c53a40ee5ae272cb6c0a5198 /ui
parent6c222d286a860261f2b01e7eece8555e6ab57b9b (diff)
downloadjquery-ui-20201c28549a318937910ef847ec8be0ed6a3179.tar.gz
jquery-ui-20201c28549a318937910ef847ec8be0ed6a3179.zip
dialog: filter invalid option-position values, convert title argument to string (ala closeText)
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.dialog.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js
index d03537c31..07d1defb1 100644
--- a/ui/jquery.ui.dialog.js
+++ b/ui/jquery.ui.dialog.js
@@ -382,6 +382,8 @@ $.widget("ui.dialog", {
// deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
// if (typeof position == 'string' || $.isArray(position)) {
// myAt = $.isArray(position) ? position : position.split(' ');
+ if (!position || (typeof positon != "string" && typeof positon != "object"))
+ return
if (typeof position == 'string' || '0' in position) {
myAt = position.split ? position.split(' ') : [position[0], position[1]];
if (myAt.length == 1) {
@@ -468,7 +470,8 @@ $.widget("ui.dialog", {
(isResizable || (value !== false && self._makeResizable(value)));
break;
case "title":
- $(".ui-dialog-title", self.uiDialogTitlebar).html(value || '&nbsp;');
+ // convert whatever was passed in o a string, for html() to not throw up
+ $(".ui-dialog-title", self.uiDialogTitlebar).html("" + (value || '&nbsp;'));
break;
case "width":
resize = true;