How can I block click events from getting to the canvas?

If I add HTML elements on top of the canvas, when I click things on them the click ‘leaks’ into the three.js scene.

For example, if I click in the text field shown in the attachment while the video panel is behind it, the video panel activates as well as the focus going to the input field.

I have tried several methods of not propagating the click event but none of them seem to work.

Does anyone know the proper way to stop events from propagating into the canvas?

Original Post on Discord

by user 563549194137239552

Which exporter version are you currently using?

2.50.0-pre with unity 2021.3.3f1

by user 563549194137239552

Oh thats an old version. I think the issue youre having was fixed in/since 2.59.0-pre

I’ll give it a try but it will have to wait a bit

by user 563549194137239552

any hint to what the fix was?

by user 563549194137239552

The engine input did subscribe to the window input events and the input-start events didnt filter if the target element was the threejs canvas.

ok… thanks!

by user 563549194137239552

That being said: the change i was thinking of probably doesnt fix your issue. I will try to test that in a little bit and make another release if necessary

ok cool

by user 563549194137239552

Should be fixed in 2.59.2-pre.1

Fix confirmed

by user 563549194137239552

Great!