downshift-js/downshift

Consider using passive event listeners

Open

#1650 aperta il 23 mag 2025

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)JavaScript (980 fork)batch import
help wantedneeds investigation

Metriche repository

Star
 (11.761 star)
Metriche merge PR
 (Merge medio 4g 9h) (7 PR mergiate in 30 g)

Descrizione

When rendering a Downshift component in Chrome, I see this message logged 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. See https://www.chromestatus.com/feature/5745543795965952

Chrome developer tools indicates that these listeners are not passive: https://github.com/downshift-js/downshift/blob/master/src/hooks/utils.js#L421-L425

Would it be possible to make these listeners passive without affecting functionality?

Guida contributor