downshift-js/downshift

Consider using passive event listeners

開放

#1,650 建立於 2025年5月23日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (980 個分叉)batch import
help wantedneeds investigation

倉庫指標

星標
 (11,761 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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?

貢獻者指南