From 9d5f91ece2129801b4981b5befb588e8f215efd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Fri, 19 Oct 2012 17:04:35 -0400 Subject: [PATCH] Tooltip: Comment why we need to use closest --- ui/jquery.ui.tooltip.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 0f69e898f..2323ae243 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -127,7 +127,9 @@ $.widget( "ui.tooltip", { open: function( event ) { var target = $( event ? event.target : this.element ) - .closest( this.options.items ); + // we need closest here due to mouseover bubbling, + // but always pointing at the same event target + .closest( this.options.items ); // No element to show a tooltip for if ( !target.length ) { -- 2.39.5