Click event not fire is a second div is above

Hi, I had a problem with the latest version of BabylonJS. I updated BabylonJS and the mouse events stopped working.
I use html interfaces for my application and babylon to paint the 3D models. I use bootstrap to show the interfaces over the canvas div. It used to work but now when I open an offCanvas the mouse events on the babylon canvas stop working. I can’t rotate the camera.
Does anyone know what the problem could be?

Thanks in advance.

Regards.

Hello and welcome :slight_smile:

Most likely, your HTML UI is blocking pointer events, avoiding BabylonJS to handle them from the canvas. You can try to set the CSS property pointer-events: none on the overlay div in order to make the div ignore mouse events, allowing them to propagate to the canvas beneath it.

It doesn’t work, and I can’t use the bootstrap interfaces. In version 3 of babylonJS both things worked perfectly. What has changed in version 7? Can it be configured to work again?

can you provide a minimal repro?

1 Like

What version did you upgrade from? And as others have said, reproduction would be crucial.

EDIT - did you upgrade from 3 to 7? If this is the only issue you are facing that would be amazing :slight_smile:
It might be the attach function not executed correctly, or with different parameters. But no idea without a demo

Hi, I’ve been testing the application with previous versions of BabylonJS and I’ve managed to get it working again with version 4. I’m leaving it on that version for now, but I’ll investigate further in the future why this happens. Thanks to everyone for your help.

Would be great to know what the reason for it to stop working with 5.X and up. might be a breaking change we didn’t notice (or might be something we have published in our changelog)