orefalo/svelte-splitpanes

Splitpanes.svelte:284 Unable to preventDefault inside passive event listener invocation.

ndeshpande2022 opened this issue · 2 comments

After upgrading to v0.8.2 I'm seeing an error in our logs.

Splitpanes.svelte:284 Unable to preventDefault inside passive event listener invocation.

image

Otherwise the update seems to work okay

Hi @ndeshpande2022,
That's expected,
That's because the events are now passive by default.

This is used to enable performance optimizations described in § 2.8 Observing event listeners and touch devices.

I believe we should have made these even passive from the get go, but at the time there was no easy way to support old devices (which do no support passive:true). anyways, reading other component's code, I found a solution.

Let me know if it creates side effects,

@orefalo - thanks so much for letting me know. I saw the commit, and I just wanted to make sure I wasn't doing something wrong.

Thanks so much!