diff options
author | Scott González <scott.gonzalez@gmail.com> | 2008-09-03 01:49:26 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2008-09-03 01:49:26 +0000 |
commit | d6a247afffd6169b7ef58f03a67df9dcf5894c30 (patch) | |
tree | c5a52f925a862f815ab6a2fad4917e03f6e5b5c7 | |
parent | ccdb99e313edc48f423c6ec75a052e8f8d268268 (diff) | |
download | jquery-ui-d6a247afffd6169b7ef58f03a67df9dcf5894c30.tar.gz jquery-ui-d6a247afffd6169b7ef58f03a67df9dcf5894c30.zip |
Dialog: Fixed #3259: Remove title attribute from dialog elements on init.
-rw-r--r-- | ui/ui.dialog.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/ui.dialog.js b/ui/ui.dialog.js index 426b04569..e5b36099b 100644 --- a/ui/ui.dialog.js +++ b/ui/ui.dialog.js @@ -29,7 +29,8 @@ var setDataSwitch = { $.widget("ui.dialog", { _init: function() { - this.options.title = this.options.title || this.element.attr('title'); + this.originalTitle = this.element.attr('title'); + this.options.title = this.options.title || this.originalTitle; var self = this, options = this.options, @@ -38,6 +39,7 @@ $.widget("ui.dialog", { : 'n,e,s,w,se,sw,ne,nw', uiDialogContent = this.element + .removeAttr('title') .addClass('ui-dialog-content') .wrap('<div/>') .wrap('<div/>'), @@ -309,6 +311,8 @@ $.widget("ui.dialog", { .removeClass('ui-dialog-content') .hide().appendTo('body'); this.uiDialog.remove(); + + (this.originalTitle && this.element.attr('title', this.originalTitle)); }, _createButtons: function(buttons) { |