]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Verify that we get a string back from .attr( "title" ) before using the retur...
authorScott González <scott.gonzalez@gmail.com>
Wed, 14 Jul 2010 19:28:01 +0000 (15:28 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 14 Jul 2010 19:28:01 +0000 (15:28 -0400)
tests/unit/dialog/dialog.html
ui/jquery.ui.dialog.js

index 97a5d44cd012120f12f04b758efc7f5b0980c51f..d8260cc9f981c44ececd07aabc575aa4f328784e 100644 (file)
@@ -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>
index 5fb5f1007e9e43a1016c36b9c723c1390c69bda9..46f93166989e39d7dbb6713b09acd4408dd9dcf5 100644 (file)
@@ -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,