Skip to content

Commit dbf31da

Browse files
committed
Tooltip: Only check if the element is active if the event that is causing the tooltip to close is not focusout.
1 parent b8b0c52 commit dbf31da

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/jquery.ui.tooltip.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ $.widget( "ui.tooltip", {
179179

180180
// don't close if the element has focus
181181
// this prevents the tooltip from closing if you hover while focused
182-
if ( !force && this.document[0].activeElement === target[0] ) {
182+
// we have to check the event type because tabbing out of the document
183+
// may leave the element as the activeElement
184+
if ( !force && event && event.type !== "focusout" &&
185+
this.document[0].activeElement === target[0] ) {
183186
return;
184187
}
185188

0 commit comments

Comments
 (0)