]> source.dussan.org Git - jquery-ui.git/commitdiff
Tooltip: Don't apply disabled style changes on create
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 21 Sep 2015 11:37:51 +0000 (13:37 +0200)
committerScott González <scott.gonzalez@gmail.com>
Fri, 25 Sep 2015 17:47:17 +0000 (13:47 -0400)
Ref #9151
Ref gh-1599

ui/widgets/tooltip.js

index 512224050f487450bb6e67bdddebbddda0794ee5..daf783a98a2469ea64e58f017e5ebff8e96e0cbc 100644 (file)
@@ -105,10 +105,6 @@ $.widget( "ui.tooltip", {
                // IDs of parent tooltips where we removed the title attribute
                this.parents = {};
 
-               if ( this.options.disabled ) {
-                       this._disable();
-               }
-
                // Append the aria-live region so tooltips announce correctly
                this.liveRegion = $( "<div>" )
                        .attr( {
@@ -123,14 +119,6 @@ $.widget( "ui.tooltip", {
        _setOption: function( key, value ) {
                var that = this;
 
-               if ( key === "disabled" ) {
-                       this[ value ? "_disable" : "_enable" ]();
-                       this.options[ key ] = value;
-
-                       // disable element style changes
-                       return;
-               }
-
                this._super( key, value );
 
                if ( key === "content" ) {
@@ -140,6 +128,10 @@ $.widget( "ui.tooltip", {
                }
        },
 
+       _setOptionDisabled: function( value ) {
+               this[ value ? "_disable" : "_enable" ]();
+       },
+
        _disable: function() {
                var that = this;