mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Tooltip: Clear the tracking interval on close. Fixes #8920 -Tooltip potential setinterval endless loop.
This commit is contained in:
parent
9f841dffcc
commit
9cbd4b4222
5
ui/jquery.ui.tooltip.js
vendored
5
ui/jquery.ui.tooltip.js
vendored
@ -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" ) );
|
||||
|
Loading…
Reference in New Issue
Block a user