Skip to content

Commit

Permalink
Tooltip: Make sure we have a target before trying to open the tooltip.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgonzalez committed Feb 26, 2011
1 parent b4d75c1 commit 31a181a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ui/jquery.ui.tooltip.js
Expand Up @@ -68,6 +68,9 @@ $.widget("ui.tooltip", {

open: function(event) {
var target = $(event && event.target || this.element).closest(this.options.items);
if ( !target.length ) {
return;
}
// already visible? possible when both focus and mouseover events occur
if (this.current && this.current[0] == target[0])
return;
Expand Down

0 comments on commit 31a181a

Please sign in to comment.