mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Tooltip: Ignore disabled checks when closing. Fixes #8758 - Tooltip: Tooltip is shown, but not hidden if element has class=ui-state-disabled.
This commit is contained in:
parent
1cdeeccab0
commit
498aadf644
@ -94,4 +94,17 @@ test( "form containing an input with name title", function() {
|
||||
equal( $( ".ui-tooltip" ).length, 0, "no tooltip for form" );
|
||||
});
|
||||
|
||||
test( "tooltip on .ui-state-disabled element", function() {
|
||||
expect( 2 );
|
||||
|
||||
var container = $( "#contains-tooltipped" ).tooltip(),
|
||||
element = $( "#contained-tooltipped" ).addClass( "ui-state-disabled" );
|
||||
|
||||
element.trigger( "mouseover" );
|
||||
equal( $( ".ui-tooltip" ).length, 1 );
|
||||
|
||||
container.empty();
|
||||
equal( $( ".ui-tooltip" ).length, 0 );
|
||||
});
|
||||
|
||||
}( jQuery ) );
|
||||
|
2
ui/jquery.ui.tooltip.js
vendored
2
ui/jquery.ui.tooltip.js
vendored
@ -299,7 +299,7 @@ $.widget( "ui.tooltip", {
|
||||
if ( !event || event.type === "focusin" ) {
|
||||
events.focusout = "close";
|
||||
}
|
||||
this._on( target, events );
|
||||
this._on( true, target, events );
|
||||
},
|
||||
|
||||
close: function( event ) {
|
||||
|
Loading…
Reference in New Issue
Block a user