Browse Source

Fixed graph tooltip lingering when changing dashboard using keyboard, Fixes #1700

Torkel Ödegaard 10 years ago
parent
commit
7a95451288
1 changed files with 8 additions and 2 deletions
  1. 8 2
      public/app/directives/bodyClass.js

+ 8 - 2
public/app/directives/bodyClass.js

@@ -1,8 +1,9 @@
 define([
 define([
   'angular',
   'angular',
-  'lodash'
+  'lodash',
+  'jquery'
 ],
 ],
-function (angular, _) {
+function (angular, _, $) {
   'use strict';
   'use strict';
 
 
   angular
   angular
@@ -13,6 +14,11 @@ function (angular, _) {
 
 
           var lastHideControlsVal;
           var lastHideControlsVal;
 
 
+          // tooltip removal fix
+          $scope.$on("$routeChangeSuccess", function() {
+            $("#tooltip").remove();
+          });
+
           $scope.$watch('submenuEnabled', function() {
           $scope.$watch('submenuEnabled', function() {
             if (!$scope.dashboard) {
             if (!$scope.dashboard) {
               return;
               return;