aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-12-18 08:38:36 -0500
committerScott González <scott.gonzalez@gmail.com>2012-12-18 08:38:36 -0500
commit9cbd4b42221389277cf90a6662f17c500d1a77df (patch)
tree81c30c4001c7afe2a4a0388266ccd2d27ab9138f /ui
parent9f841dffcc83105cc2517c7e31640848fbfff0af (diff)
downloadjquery-ui-9cbd4b42221389277cf90a6662f17c500d1a77df.tar.gz
jquery-ui-9cbd4b42221389277cf90a6662f17c500d1a77df.zip
Tooltip: Clear the tracking interval on close. Fixes #8920 -Tooltip potential setinterval endless loop.
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.tooltip.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index 3984826ce..d44ff8d06 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/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" ) );