From dbf31da79f30740136c2cb3b20269a7eabf9af67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 30 Apr 2012 13:31:14 -0400 Subject: [PATCH] Tooltip: Only check if the element is active if the event that is causing the tooltip to close is not focusout. --- ui/jquery.ui.tooltip.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; }