downshift-js/downshift

Consider using passive event listeners

Open

#1.650 aberto em 23 de mai. de 2025

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)JavaScript (980 forks)batch import
help wantedneeds investigation

Métricas do repositório

Stars
 (11.761 stars)
Métricas de merge de PR
 (Mesclagem média 6d 9h) (5 fundiu PRs em 30d)

Description

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?

Guia do colaborador