mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Dialog: Fixed #3259: Remove title attribute from dialog elements on init.
This commit is contained in:
parent
ccdb99e313
commit
d6a247afff
@ -29,7 +29,8 @@ var setDataSwitch = {
|
|||||||
|
|
||||||
$.widget("ui.dialog", {
|
$.widget("ui.dialog", {
|
||||||
_init: function() {
|
_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,
|
var self = this,
|
||||||
options = this.options,
|
options = this.options,
|
||||||
@ -38,6 +39,7 @@ $.widget("ui.dialog", {
|
|||||||
: 'n,e,s,w,se,sw,ne,nw',
|
: 'n,e,s,w,se,sw,ne,nw',
|
||||||
|
|
||||||
uiDialogContent = this.element
|
uiDialogContent = this.element
|
||||||
|
.removeAttr('title')
|
||||||
.addClass('ui-dialog-content')
|
.addClass('ui-dialog-content')
|
||||||
.wrap('<div/>')
|
.wrap('<div/>')
|
||||||
.wrap('<div/>'),
|
.wrap('<div/>'),
|
||||||
@ -309,6 +311,8 @@ $.widget("ui.dialog", {
|
|||||||
.removeClass('ui-dialog-content')
|
.removeClass('ui-dialog-content')
|
||||||
.hide().appendTo('body');
|
.hide().appendTo('body');
|
||||||
this.uiDialog.remove();
|
this.uiDialog.remove();
|
||||||
|
|
||||||
|
(this.originalTitle && this.element.attr('title', this.originalTitle));
|
||||||
},
|
},
|
||||||
|
|
||||||
_createButtons: function(buttons) {
|
_createButtons: function(buttons) {
|
||||||
|
Loading…
Reference in New Issue
Block a user