@@ -158,6 +158,11 @@ export function grafanaAppDirective() {
}
});
+ // tooltip removal fix
+ scope.$on("$routeChangeSuccess", function() {
+ $("#tooltip, .tooltip").remove();
+ });
+
// handle document clicks that should hide things
elem.click(function(evt) {
if ($(evt.target).parents().length === 0) {
@@ -12,11 +12,6 @@ function (_, $, coreModule) {
var lastHideControlsVal;
- // tooltip removal fix
- $scope.$on("$routeChangeSuccess", function() {
- $("#tooltip, .tooltip").remove();
- });
-
$scope.$watch('dashboard.hideControls', function() {
if (!$scope.dashboard) {
return;