#preventDefault error when scrolling
12 messages · Page 1 of 1 (latest)
Do you have a codesandbox example?
I have my website online
As I used Locomotive scroll (i dont think it comes from here)
I don't know how I could reproduce the whole components and stuff in sandbox as i'm also using a 2d renderer
Anyone have an idea how to fix this ? Thanks !
You would have to share some code or a link to your website or something.
Sure, here’s the link of the page in which the error occurs when you scroll : https://portfolio2023-mu.vercel.app/about
"The correct way to fix this issue is by finding the event listener responsible for generating the intervention violation and removing the preventDefault() call in that event listener. The preventDefault() call can't be used in a passive event listener. For example, a touchstart, touchmove, or wheel event listener is passive as default. Removing a preventDefault() call can be easy, but test what happens when removing the call from the listener."
You are probably using preventDefault in your scroll handler
I'm using LocomotiveScroll as a global handler