]> source.dussan.org Git - jquery-ui.git/commitdiff
Tooltip: Make sure we have a target before trying to open the tooltip.
authorScott González <scott.gonzalez@gmail.com>
Sat, 26 Feb 2011 14:06:06 +0000 (15:06 +0100)
committerScott González <scott.gonzalez@gmail.com>
Sat, 26 Feb 2011 14:06:06 +0000 (15:06 +0100)
ui/jquery.ui.tooltip.js

index 57e65f92300eb90731f3f464c76883ebe4063e3c..9b4d52bd1821f8d224f1eef91660e018662fa5fe 100644 (file)
@@ -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;