# Click event not fire is a second div is above

**URL:** https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206
**Category:** Questions
**Created:** [December 5, 2024, 11:43am UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206 "2024-12-05T11:43:05Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![nacheitor](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nacheitor/32/44081_2.png) [@nacheitor](https://forum.babylonjs.com/u/nacheitor)
#### Post date: [December 5, 2024, 11:43am UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206/1 "2024-12-05T11:43:05Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Tricotou](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/tricotou/32/5844_2.png) [@Tricotou](https://forum.babylonjs.com/u/Tricotou)
#### Post date: [December 5, 2024, 11:47am UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206/2 "2024-12-05T11:47:09Z")

</div>

Hello and welcome 🙂

> [@nacheitor](#):
>
> I use bootstrap to show the interfaces over the canvas div

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.

---

<div class="post-metadata">

### Author: ![nacheitor](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nacheitor/32/44081_2.png) [@nacheitor](https://forum.babylonjs.com/u/nacheitor)
#### Post date: [December 5, 2024, 12:52pm UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206/3 "2024-12-05T12:52:43Z")

</div>

> [@Tricotou](#):
>
> pointer-events

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?

---

<div class="post-metadata">

### Author: ![riven04](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/riven04/32/35407_2.png) [@riven04](https://forum.babylonjs.com/u/riven04)
#### Post date: [December 5, 2024, 3:45pm UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206/4 "2024-12-05T15:45:52Z")

</div>

can you provide a minimal repro?

---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [December 6, 2024, 11:15am UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206/5 "2024-12-06T11:15:15Z")

</div>

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 🙂  
It might be the attach function not executed correctly, or with different parameters. But no idea without a demo

---

<div class="post-metadata">

### Author: ![nacheitor](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/nacheitor/32/44081_2.png) [@nacheitor](https://forum.babylonjs.com/u/nacheitor)
#### Post date: [December 9, 2024, 9:22am UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206/6 "2024-12-09T09:22:29Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)
#### Post date: [December 9, 2024, 12:00pm UTC](https://forum.babylonjs.com/t/click-event-not-fire-is-a-second-div-is-above/55206/7 "2024-12-09T12:00:17Z")

</div>

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)
