svelte-splitpanes icon indicating copy to clipboard operation
svelte-splitpanes copied to clipboard

Getting "Added non-passive event listener to a scroll-blocking 'touchstart' event." warning in the latest chrome browser

Open dhinesh03 opened this issue 2 years ago • 5 comments

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

dhinesh03 avatar Sep 05 '23 08:09 dhinesh03

Hi @dhinesh03, thanks for the recommendation. mind providing mode details? the link doesn't work

orefalo avatar Sep 05 '23 09:09 orefalo

I believe this is what you are referring to

https://stackoverflow.com/questions/37721782/what-are-passive-event-listeners

orefalo avatar Sep 05 '23 09:09 orefalo

@orefalo Thanks for the quick attention. Yes, this is the one.

dhinesh03 avatar Sep 05 '23 09:09 dhinesh03

Looks pretty easy to implement from my quick reading - https://svelte.dev/docs/element-directives#on-eventname

<div on:touchstart|passive={handleTouchStart}>

will work on it later today,

Sincerely,

orefalo avatar Sep 05 '23 09:09 orefalo

Looks pretty easy to implement from my quick reading - https://svelte.dev/docs/element-directives#on-eventname

<div on:touchstart|passive={handleTouchStart}>

will work on it later today,

Sincerely,

Thank you so much

dhinesh03 avatar Sep 05 '23 09:09 dhinesh03

I just released an elegant fix in master. it should work smoothly

orefalo avatar Jun 09 '24 17:06 orefalo