Disable wheel on parent

Everything seems to be ok on my sample and it uses the wheel event flawlessly, unfortunately if I place it on another web as an iframe the wheel makes its work on my sample but also scrolls the parent web.

I’ve been so naive and thought that

evt.preventDefault();
evt.stopPropagation();

could make the work but it was not the solution.
Any idea about that? Thank you!

When attaching the canvas (attachCanvas on the camera), set noPreventDefault to false. This should prevent this from happening

Mmm unfortunately it didn’t work

that’s interesting. I remember having this issue once and this was the one line i was missing to make it work.

Want to share a page so we can check together?

1 Like