Skip to content
Permalink
Browse files

Tooltip: Run _disable when disabled option is set on create. Fixes #8…

…712 - Tooltip: Disabled tooltips on initialization.
  • Loading branch information...
jzaefferer committed Oct 24, 2012
1 parent 1fcccd4 commit ba752cf7eda841ded93688ab3167b5515fa1660c
Showing with 12 additions and 0 deletions.
  1. +8 −0 tests/unit/tooltip/tooltip_options.js
  2. +4 −0 ui/jquery.ui.tooltip.js
@@ -2,6 +2,14 @@

module( "tooltip: options" );

test( "disabled: true", function() {
expect( 1 );
$( "#tooltipped1" ).tooltip({
disabled: true
}).tooltip( "open" );
equal( $( ".ui-tooltip" ).length, 0 );
});

test( "content: default", function() {
expect( 1 );
var element = $( "#tooltipped1" ).tooltip().tooltip( "open" );
@@ -75,6 +75,10 @@ $.widget( "ui.tooltip", {
this.tooltips = {};
// IDs of parent tooltips where we removed the title attribute
this.parents = {};

if ( this.options.disabled ) {
this._disable();
}
},

_setOption: function( key, value ) {

0 comments on commit ba752cf

Please sign in to comment.
You can’t perform that action at this time.