Browse Source

Use Passive eventListener for 'wheel' (#12106)

* make wheel passive

* remove console
Ryan McKinley 7 years ago
parent
commit
1f32871f70
1 changed files with 1 additions and 1 deletions
  1. 1 1
      public/app/core/components/grafana_app.ts

+ 1 - 1
public/app/core/components/grafana_app.ts

@@ -199,7 +199,7 @@ export function grafanaAppDirective(playlistSrv, contextSrv, $timeout, $rootScop
       body.mousemove(userActivityDetected);
       body.keydown(userActivityDetected);
       // set useCapture = true to catch event here
-      document.addEventListener('wheel', userActivityDetected, true);
+      document.addEventListener('wheel', userActivityDetected, { capture: true, passive: true });
       // treat tab change as activity
       document.addEventListener('visibilitychange', userActivityDetected);