From 466864c7579ad4031beec37ad63b0f9bbb708f32 Mon Sep 17 00:00:00 2001 From: Bob Thomas Date: Tue, 16 Sep 2014 17:19:39 -0400 Subject: [PATCH] fix scope leak in tooltip Fixes #2709 --- src/tooltip/tooltip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index de6d66dc16..a9cd99a4c1 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -240,6 +240,8 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap function removeTooltip() { transitionTimeout = null; if (tooltip) { + // clean up the popup directive's scope before removing from DOM + tooltip.children().scope().$destroy(); tooltip.remove(); tooltip = null; }