Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@scottgonzalez scottgonzalez authored
Showing with 5 additions and 0 deletions.
  1. +1 −0  tests/unit/dialog/dialog.html
  2. +4 −0 ui/jquery.ui.dialog.js
View
1  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>
View
4 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,
Please sign in to comment.
Something went wrong with that request. Please try again.