diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index dd02a077a1..afd6393f90 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -405,7 +405,7 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s cancelShow(); } - if (val && ttScope.isOpen) { + if (val && ttScope && ttScope.isOpen) { hide(); } }); @@ -577,6 +577,13 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s removeTooltip(); ttScope = null; }); + + // Make sure tooltip is destroyed and removed When User Changes Message Or Remove From Template. + scope.$on('$uibTooltipdestroy', function onDestroyTooltip() { + unregisterTriggers(); + removeTooltip(); + ttScope = null; + }); }; } };