diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-11-09 13:07:53 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-11-09 13:07:53 -0500 |
commit | 498aadf644ddca86de838dc2001267ded972df2c (patch) | |
tree | d4708f78ed78e1858b0354ba3143020b26f09fc4 | |
parent | 1cdeeccab0e76495842cad9d04e686aee802777d (diff) | |
download | jquery-ui-498aadf644ddca86de838dc2001267ded972df2c.tar.gz jquery-ui-498aadf644ddca86de838dc2001267ded972df2c.zip |
Tooltip: Ignore disabled checks when closing. Fixes #8758 - Tooltip: Tooltip is shown, but not hidden if element has class=ui-state-disabled.
-rw-r--r-- | tests/unit/tooltip/tooltip_core.js | 13 | ||||
-rw-r--r-- | ui/jquery.ui.tooltip.js | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/tests/unit/tooltip/tooltip_core.js b/tests/unit/tooltip/tooltip_core.js index f0aed72aa..69936dba2 100644 --- a/tests/unit/tooltip/tooltip_core.js +++ b/tests/unit/tooltip/tooltip_core.js @@ -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 ) ); diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 5145884a3..e5b496bee 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -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 ) { |