vue-agile
vue-agile copied to clipboard
Lighthouse optimization : Does not use passive listeners to improve scrolling performance
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