Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Dialog: Verify that we get a string back from .attr( "title" ) before…

… using the return value. Fixes #5742 - Form field with `name="title"` moved to title area.
  • Loading branch information...
commit 2c7a9e9ff3540365254ee1b9b3113e6c2ad9f5f3 1 parent cdd6161
Scott González authored July 14, 2010
1  tests/unit/dialog/dialog.html
@@ -19,6 +19,7 @@
19 19
 	<link rel="stylesheet" href="../../../external/qunit.css" type="text/css"/>
20 20
 	<script type="text/javascript" src="../../../external/qunit.js"></script>
21 21
 	<script type="text/javascript" src="../../jquery.simulate.js"></script>
  22
+	<script type="text/javascript" src="../testsuite.js"></script>
22 23
 	
23 24
 	<script type="text/javascript" src="dialog_core.js"></script>
24 25
 	<script type="text/javascript" src="dialog_defaults.js"></script>
4  ui/jquery.ui.dialog.js
@@ -49,6 +49,10 @@ $.widget("ui.dialog", {
49 49
 	},
50 50
 	_create: function() {
51 51
 		this.originalTitle = this.element.attr('title');
  52
+		// #5742 - .attr() might return a DOMElement
  53
+		if ( typeof this.originalTitle !== "string" ) {
  54
+			this.originalTitle = "";
  55
+		}
52 56
 
53 57
 		var self = this,
54 58
 			options = self.options,

0 notes on commit 2c7a9e9

Please sign in to comment.
Something went wrong with that request. Please try again.