Skip to content

Commit

Permalink
Use Passive eventListener for 'wheel' (#12106)
Browse files Browse the repository at this point in the history
* make wheel passive

* remove console
  • Loading branch information
ryantxu authored and torkelo committed Jun 7, 2018
1 parent 3fb4eb7 commit 1f32871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/app/core/components/grafana_app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1f32871

Please sign in to comment.