Skip to content
Permalink
Browse files

Tooltip: Comment why we need to use closest

  • Loading branch information...
jzaefferer committed Oct 19, 2012
1 parent 5bd5ef1 commit 9d5f91ece2129801b4981b5befb588e8f215efd1
Showing with 3 additions and 1 deletion.
  1. +3 −1 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 ) {

0 comments on commit 9d5f91e

Please sign in to comment.
You can’t perform that action at this time.