Torkel Ödegaard 10 лет назад
Родитель
Сommit
0cb68b86fc

+ 5 - 0
public/app/core/components/grafana_app.ts

@@ -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) {

+ 0 - 5
public/app/core/directives/body_class.js

@@ -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;