mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Tooltip: Run _disable when disabled option is set on create. Fixes #8712 - Tooltip: Disabled tooltips on initialization.
This commit is contained in:
parent
1fcccd45ce
commit
ba752cf7ed
@ -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" );
|
||||
|
4
ui/jquery.ui.tooltip.js
vendored
4
ui/jquery.ui.tooltip.js
vendored
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user