Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tooltip: Clear the tracking interval on close. Fixes #8920 -Tooltip p…

…otential setinterval endless loop.
  • Loading branch information...
commit 9cbd4b42221389277cf90a6662f17c500d1a77df 1 parent 9f841df
@scottgonzalez scottgonzalez authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 ui/jquery.ui.tooltip.js
View
5 ui/jquery.ui.tooltip.js
@@ -270,7 +270,7 @@ $.widget( "ui.tooltip", {
// as the tooltip is visible, position the tooltip using the most recent
// event.
if ( this.options.show && this.options.show.delay ) {
- delayedShow = setInterval(function() {
+ delayedShow = this.delayedShow = setInterval(function() {
if ( tooltip.is( ":visible" ) ) {
position( positionOption.of );
clearInterval( delayedShow );
@@ -312,6 +312,9 @@ $.widget( "ui.tooltip", {
return;
}
+ // Clear the interval for delayed tracking tooltips
+ clearInterval( this.delayedShow );
+
// only set title if we had one before (see comment in _open())
if ( target.data( "ui-tooltip-title" ) ) {
target.attr( "title", target.data( "ui-tooltip-title" ) );
Please sign in to comment.
Something went wrong with that request. Please try again.