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

fix(tooltip): race condition when setting position #4765

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s

// Hide the tooltip popup element.
function hide() {
cancelShow();
cancelHide();

if (!ttScope) {
return;
}
Expand Down Expand Up @@ -307,9 +304,10 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s
}

function removeTooltip() {
cancelShow();
cancelHide();
unregisterObservers();

transitionTimeout = null;
if (tooltip) {
tooltip.remove();
tooltip = null;
Expand Down Expand Up @@ -501,8 +499,6 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s

// Make sure tooltip is destroyed and removed.
scope.$on('$destroy', function onDestroyTooltip() {
cancelShow();
cancelHide();
unregisterTriggers();
removeTooltip();
openedTooltips.remove(ttScope);
Expand Down