mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tooltip: Removed logic for handling tracking tooltips which gain focus while open (we no longer mix events). Fixes #8799 - Tooltip: tracking fails on nested elements.
(cherry picked from commit ca0df6b900
)
This commit is contained in:
parent
f4ce4d309c
commit
0be0c2603c
16
ui/jquery.ui.tooltip.js
vendored
16
ui/jquery.ui.tooltip.js
vendored
@ -138,20 +138,8 @@ $.widget( "ui.tooltip", {
|
|||||||
// but always pointing at the same event target
|
// but always pointing at the same event target
|
||||||
.closest( this.options.items );
|
.closest( this.options.items );
|
||||||
|
|
||||||
// No element to show a tooltip for
|
// No element to show a tooltip for or the tooltip is already open
|
||||||
if ( !target.length ) {
|
if ( !target.length || target.data( "ui-tooltip-id" ) ) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the tooltip is open and we're tracking then reposition the tooltip.
|
|
||||||
// This makes sure that a tracking tooltip doesn't obscure a focused element
|
|
||||||
// if the user was hovering when the element gained focused.
|
|
||||||
if ( this.options.track && target.data( "ui-tooltip-id" ) ) {
|
|
||||||
this._find( target ).position( $.extend({
|
|
||||||
of: target
|
|
||||||
}, this.options.position ) );
|
|
||||||
// Stop tracking (#8622)
|
|
||||||
this._off( this.document, "mousemove" );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user