From 31a181abfc05334eca8e9875e17746fcb01515d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 26 Feb 2011 15:06:06 +0100 Subject: [PATCH] Tooltip: Make sure we have a target before trying to open the tooltip. --- ui/jquery.ui.tooltip.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 57e65f923..9b4d52bd1 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -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; -- 2.39.5