Instead of adding all these other listeners, I looked at the actual data and decided that the most efficient way is to simply inherit the widget and add an additional flag
http://code.jquery.com/ui/1.10.3/jquery-ui.js
Here is a demo version of http://jsfiddle.net/3dX6d/7/
(function ($) { $.widget("custom.tooltipX", $.ui.tooltip, { options: { focusPreventClose: false }, close: function (event, target, content) { if (this.options.focusPreventClose && $(this.element).is(":focus")) {
Compared to another solution, this does not require us to work with additional open calls (which actually make several other calls inside it). We simply prevent the tooltip from closing when we focus on the element, as required by the initial publication.
source share