aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-10-19 17:04:35 -0400
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-10-19 20:57:13 -0400
commit9d5f91ece2129801b4981b5befb588e8f215efd1 (patch)
tree0f033d5c52829d4bf846f9bd8a77e107be2aaa91 /ui
parent5bd5ef15f9f7d1820334abd52aa5ee4b25c992ba (diff)
downloadjquery-ui-9d5f91ece2129801b4981b5befb588e8f215efd1.tar.gz
jquery-ui-9d5f91ece2129801b4981b5befb588e8f215efd1.zip
Tooltip: Comment why we need to use closest
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.tooltip.js4
1 files changed, 3 insertions, 1 deletions
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 ) {