Tooltip: Only check if the element is active if the event that is causing the tooltip to close is not focusout.

This commit is contained in:
Scott González 2012-04-30 13:31:14 -04:00
parent b8b0c52830
commit dbf31da79f

View File

@ -179,7 +179,10 @@ $.widget( "ui.tooltip", {
// don't close if the element has focus // don't close if the element has focus
// this prevents the tooltip from closing if you hover while focused // 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; return;
} }