#preventDefault error when scrolling

12 messages · Page 1 of 1 (latest)

wintry pelican
#

Hey !

I'm encountering this error when I'm trying to scroll on my page
Note : This page is a fullscreen page, there's no scroll in it

Any idea how to fix it ?
Thank !

clever sand
#

Do you have a codesandbox example?

wintry pelican
#

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

wintry pelican
#

Anyone have an idea how to fix this ? Thanks !

woven spoke
#

You would have to share some code or a link to your website or something.

wintry pelican
woven spoke
#

"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

wintry pelican
#

I'm using LocomotiveScroll as a global handler