diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index f1e0180346..6604e51064 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -65,7 +65,7 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap * Returns the actual instance of the $tooltip service. * TODO support multiple triggers */ - this.$get = [ '$window', '$compile', '$timeout', '$document', '$position', '$interpolate', function ( $window, $compile, $timeout, $document, $position, $interpolate ) { + this.$get = [ '$window', '$compile', '$timeout', '$document', '$position', '$interpolate', '$rootScope', function ( $window, $compile, $timeout, $document, $position, $interpolate, $rootScope ) { return function $tooltip ( type, prefix, defaultTriggerShow, options ) { options = angular.extend( {}, defaultOptions, globalOptions, options ); @@ -179,9 +179,10 @@ angular.module( 'ui.bootstrap.tooltip', [ 'ui.bootstrap.position', 'ui.bootstrap } function hideTooltipBind () { - scope.$apply(function () { - hide(); - }); + hide(); + if (!$rootScope.$$phase) { + $rootScope.$digest(); + } } // Show the tooltip popup element.