Skip to content

Commit b6cda3d

Browse files
committed
Tooltip: Added some comments.
1 parent 0fc41bc commit b6cda3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/jquery.ui.tooltip.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,16 @@ $.widget( "ui.tooltip", {
8383
}
8484

8585
// if we have a title, clear it to prevent the native tooltip
86+
// we do this before the disabled check to prevent native tooltips
87+
// even when disabled
88+
// TODO: the above doesn't work since ._bind() does a disabled check
8689
// we have to check first to avoid defining a title if none exists
8790
// (we don't want to cause an element to start matching [title])
8891
// TODO: document why we don't use .removeAttr()
8992
if ( target.is( "[title]" ) ) {
9093
target.attr( "title", "" );
9194
}
9295

93-
// TODO: why is this check after we clear the title?
9496
if ( this.options.disabled ) {
9597
return;
9698
}

0 commit comments

Comments
 (0)