mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
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.
This commit is contained in:
parent
cdd6161419
commit
2c7a9e9ff3
@ -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>
|
||||
|
4
ui/jquery.ui.dialog.js
vendored
4
ui/jquery.ui.dialog.js
vendored
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user