diff options
-rw-r--r-- | tests/unit/dialog/dialog.html | 1 | ||||
-rw-r--r-- | ui/jquery.ui.dialog.js | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/dialog/dialog.html b/tests/unit/dialog/dialog.html index 97a5d44cd..d8260cc9f 100644 --- a/tests/unit/dialog/dialog.html +++ b/tests/unit/dialog/dialog.html @@ -19,6 +19,7 @@ <link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/> <script type="text/javascript" src="../../../external/qunit.js"></script> <script type="text/javascript" src="../../jquery.simulate.js"></script> + <script type="text/javascript" src="../testsuite.js"></script> <script type="text/javascript" src="dialog_core.js"></script> <script type="text/javascript" src="dialog_defaults.js"></script> diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index 5fb5f1007..46f931669 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -49,6 +49,10 @@ $.widget("ui.dialog", { }, _create: function() { this.originalTitle = this.element.attr('title'); + // #5742 - .attr() might return a DOMElement + if ( typeof this.originalTitle !== "string" ) { + this.originalTitle = ""; + } var self = this, options = self.options, |