Skip to content

Commit ef8ac2a

Browse files
jzaeffererscottgonzalez
authored andcommitted
Tooltip: Don't apply disabled style changes on create
Ref #9151 Ref gh-1599
1 parent 1397ce4 commit ef8ac2a

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

ui/widgets/tooltip.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ $.widget( "ui.tooltip", {
105105
// IDs of parent tooltips where we removed the title attribute
106106
this.parents = {};
107107

108-
if ( this.options.disabled ) {
109-
this._disable();
110-
}
111-
112108
// Append the aria-live region so tooltips announce correctly
113109
this.liveRegion = $( "<div>" )
114110
.attr( {
@@ -123,14 +119,6 @@ $.widget( "ui.tooltip", {
123119
_setOption: function( key, value ) {
124120
var that = this;
125121

126-
if ( key === "disabled" ) {
127-
this[ value ? "_disable" : "_enable" ]();
128-
this.options[ key ] = value;
129-
130-
// disable element style changes
131-
return;
132-
}
133-
134122
this._super( key, value );
135123

136124
if ( key === "content" ) {
@@ -140,6 +128,10 @@ $.widget( "ui.tooltip", {
140128
}
141129
},
142130

131+
_setOptionDisabled: function( value ) {
132+
this[ value ? "_disable" : "_enable" ]();
133+
},
134+
143135
_disable: function() {
144136
var that = this;
145137

0 commit comments

Comments
 (0)