Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(tooltip): properly gc popupTimeout
Browse files Browse the repository at this point in the history
- Make sure to cancel timeout before setting to `null`

Closes #2786
  • Loading branch information
VitalyVoroshilov authored and wesleycho committed Sep 9, 2015
1 parent 5f68280 commit ff52f52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position'])

// Show the tooltip popup element.
function show() {
popupTimeout = null;
if (popupTimeout) {
$timeout.cancel(popupTimeout);
popupTimeout = null;
}

// If there is a pending remove transition, we must cancel it, lest the
// tooltip be mysteriously removed.
Expand Down

0 comments on commit ff52f52

Please sign in to comment.