aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-02-26 15:06:06 +0100
committerScott González <scott.gonzalez@gmail.com>2011-02-26 15:06:06 +0100
commit31a181abfc05334eca8e9875e17746fcb01515d8 (patch)
tree8c46f347bcdc292c06466315427960f9a56ed257
parentb4d75c1083d6e05b990f941005a1a7469309f8d0 (diff)
downloadjquery-ui-31a181abfc05334eca8e9875e17746fcb01515d8.tar.gz
jquery-ui-31a181abfc05334eca8e9875e17746fcb01515d8.zip
Tooltip: Make sure we have a target before trying to open the tooltip.
-rw-r--r--ui/jquery.ui.tooltip.js3
1 files changed, 3 insertions, 0 deletions
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;