Skip to content

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 angular-ui#2786
  • Loading branch information
VitalyVoroshilov authored and jasonaden committed Sep 30, 2015
1 parent 4e74ee3 commit f3db655
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 f3db655

Please sign in to comment.