orefalo / svelte-splitpanes

MIT License
372 stars 17 forks source link

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

Closed ndeshpande2022 closed 4 months ago

ndeshpande2022 commented 4 months ago

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

orefalo commented 4 months ago

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,

ndeshpande2022 commented 4 months ago

@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!