From: Scott González Date: Mon, 30 Apr 2012 17:31:14 +0000 (-0400) Subject: Tooltip: Only check if the element is active if the event that is causing the tooltip... X-Git-Tag: 1.9.0m8~55 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dbf31da79f30740136c2cb3b20269a7eabf9af67;p=jquery-ui.git Tooltip: Only check if the element is active if the event that is causing the tooltip to close is not focusout. --- diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 424eca7af..8ddcbb700 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -179,7 +179,10 @@ $.widget( "ui.tooltip", { // don't close if the element has focus // this prevents the tooltip from closing if you hover while focused - if ( !force && this.document[0].activeElement === target[0] ) { + // we have to check the event type because tabbing out of the document + // may leave the element as the activeElement + if ( !force && event && event.type !== "focusout" && + this.document[0].activeElement === target[0] ) { return; }