legitRipple.js icon indicating copy to clipboard operation
legitRipple.js copied to clipboard

"Non-passive event listener" warning.

Open ojvribeiro opened this issue 6 years ago • 1 comments

I'm receiving this warning in the console:

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.

Should I have to worry?

ojvribeiro avatar Sep 17 '17 09:09 ojvribeiro

Not really. This is what passive event listeners do: https://stackoverflow.com/a/37721906 Sadly, jquery doesn't support them natively. You could work around this, though. The lib actually currently uses one touchstart listener on the document for every element with ripples while, theoretically, only one global one would be needed. I did a quick test and, unless you have an obscene amount of ripple elements there shouldn't be an impact. http://jsbin.com/wanorosupe/1/edit #11 related

matthias-vogt avatar Sep 17 '17 12:09 matthias-vogt