Skip to content

Instantly share code, notes, and snippets.

@jzaefferer
Created November 9, 2012 10:52
Show Gist options
  • Save jzaefferer/19cd921fed1eb358dc0a to your computer and use it in GitHub Desktop.
Save jzaefferer/19cd921fed1eb358dc0a to your computer and use it in GitHub Desktop.
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index e996d0d..192ac07 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -296,7 +296,8 @@ $.widget( "ui.tooltip", {
if ( !event || event.type === "mouseover" ) {
events.mouseleave = "close";
}
- if ( !event || event.type === "focusin" ) {
+ // programmatic focus matches focusin, but event.type is 'focus'
+ if ( !event || /^focus/.test( event.type) ) {
events.focusout = "close";
}
this._on( target, events );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment