biodiv / contactjs

Pointer gestures for your webapp
MIT License
77 stars 6 forks source link

Consider marking your touch and wheel event listeners as `passive` to improve your page's scroll performance. #12

Closed GitMax42 closed 2 years ago

GitMax42 commented 2 years ago

Based on the hints from ... https://pagespeed.web.dev/report?url=https%3A%2F%2Fbiodiv.github.io%2Fcontactjs%2F ... this might be good to implement?

In general, this library is a GREAT replacement of hammer.js - thank you for that!

biodiv commented 2 years ago

Thanks for finding this. The PointerEvents listeners, which are used for detecting the gestures are already passive. But there is one touchmove listener which is there because of some native functionality where touchmove triggers pointercancel. I will make the touchmove passive, too.

biodiv commented 2 years ago

in v2.0, all event listeners are passive