Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Lighthouse optimization : Does not use passive listeners to improve scrolling performance #227

Open
juliender opened this issue Jan 6, 2022 · 0 comments
Labels

Comments

@juliender
Copy link

Describe the bug
In lighthouse, there is a warning concerning event listeners :

Does not use passive listeners to improve scrolling performance
Consider marking your touch and wheel event listeners as passive to improve your page's scroll performance.

Code
Lines 202-207
this.$refs.track.addEventListener('touchstart', this.handleMouseDown)

The warning disappears by adding {passive : true}

Ie for line 202, the code becomes this.$refs.track.addEventListener('touchstart', this.handleMouseDown, {passive : true})

Regards

@juliender juliender added the bug label Jan 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant