react-sortable-hoc
react-sortable-hoc copied to clipboard
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive
Hi @clauderic
I am facing a responsive issue while dragging the list element. Any help will be highly appreciable
Plugin version: ^1.8.3
Thanks for the help

This duplicates #210, perhaps the issue you are experiencing is not related to the violations logged in Chrome's Dev Tools.
This is actually very easy to fix by adjusting this code:
Change
this.container.addEventListener(eventName, this.events[key], false)
to
this.container.addEventListener(eventName, this.events[key], { passive: false })
Same for all the other places where addEventListener is just called with false parameter. Changing it to the object argument will tell Chrome that the event handler was intentionally passive and not output the warning any more.
This commit hasn't made it into version 2.0.0, has it?
It's still
this.container.addEventListener(eventName, this.events[key], false)