mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Tooltip: Comment why we need to use closest
This commit is contained in:
parent
5bd5ef15f9
commit
9d5f91ece2
4
ui/jquery.ui.tooltip.js
vendored
4
ui/jquery.ui.tooltip.js
vendored
@ -127,7 +127,9 @@ $.widget( "ui.tooltip", {
|
|||||||
|
|
||||||
open: function( event ) {
|
open: function( event ) {
|
||||||
var target = $( event ? event.target : this.element )
|
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
|
// No element to show a tooltip for
|
||||||
if ( !target.length ) {
|
if ( !target.length ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user