diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index c88dc0eb4d..5f440b2a61 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -210,10 +210,9 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s } function hideTooltipBind () { - hide(); - if (!$rootScope.$$phase) { - $rootScope.$digest(); - } + scope.$evalAsync(function () { + hide(); + }); } // Show the tooltip popup element. @@ -243,9 +242,7 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s isOpenExp.assign(ttScope.origScope, ttScope.isOpen); } - if (!$rootScope.$$phase) { - ttScope.$apply(); // digest required as $apply is not called - } + ttScope.$applyAsync(); // digest required as $apply is not called positionTooltip(); } @@ -284,7 +281,7 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s function createTooltip() { // There can only be one tooltip element per directive shown at once. if (tooltip) { - removeTooltip(); + return; } tooltipLinkedScope = ttScope.$new(); tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) {