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

Update tooltip.js #6563

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion src/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
Expand Down Expand Up @@ -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;
});
};
}
};
Expand Down