Tooltip: Use show.delay update only when track option is active

Fixes #14682
Closes gh-1613

(cherry picked from commit d573232707)
This commit is contained in:
Mani Mishra 2015-10-07 10:42:10 +05:30 committed by Scott González
parent b32bc7ac43
commit 11ebb6946d

View File

@ -308,8 +308,9 @@ return $.widget( "ui.tooltip", {
// Handle tracking tooltips that are shown with a delay (#8644). As soon
// as the tooltip is visible, position the tooltip using the most recent
// event.
if ( this.options.show && this.options.show.delay ) {
delayedShow = this.delayedShow = setInterval(function() {
// Adds the check to add the timers only when both delay and track options are set (#14682)
if ( this.options.track && this.options.show && this.options.show.delay ) {
delayedShow = this.delayedShow = setInterval( function() {
if ( tooltip.is( ":visible" ) ) {
position( positionOption.of );
clearInterval( delayedShow );