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

Commit ff52f52

Browse files
VitalyVoroshilovwesleycho
authored andcommitted
fix(tooltip): properly gc popupTimeout
- Make sure to cancel timeout before setting to `null` Closes #2786
1 parent 5f68280 commit ff52f52

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/tooltip/tooltip.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position'])
203203

204204
// Show the tooltip popup element.
205205
function show() {
206-
popupTimeout = null;
206+
if (popupTimeout) {
207+
$timeout.cancel(popupTimeout);
208+
popupTimeout = null;
209+
}
207210

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

0 commit comments

Comments
 (0)