# How to make the UI respond to mouse events and also penetrate the UI?

**URL:** <https://forum.babylonjs.com/t/how-to-make-the-ui-respond-to-mouse-events-and-also-penetrate-the-ui/21589>\
**Category:** Questions\
**Tags:** gui\
**Created:** [June 11, 2021, 6:39am UTC](https://forum.babylonjs.com/t/how-to-make-the-ui-respond-to-mouse-events-and-also-penetrate-the-ui/21589 "2021-06-11T06:39:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kekeqy](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kekeqy/32/12447_2.png) [@kekeqy](https://forum.babylonjs.com/u/kekeqy)\
**Post date:** [June 11, 2021, 6:39am UTC](https://forum.babylonjs.com/t/how-to-make-the-ui-respond-to-mouse-events-and-also-penetrate-the-ui/21589/1 "2021-06-11T06:39:53Z")

</div>

[https://playground.babylonjs.com/#TMYC3W](https://playground.babylonjs.com/#TMYC3W)

---

<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:** [June 11, 2021, 8:20am UTC](https://forum.babylonjs.com/t/how-to-make-the-ui-respond-to-mouse-events-and-also-penetrate-the-ui/21589/2 "2021-06-11T08:20:00Z")

</div>

You can mark the button ‘isPointerBlocker’ to false. But they you won’t get a hit on the button, as the event will flow through it. The event picking system will choose the single element that is blocking the pick and will use it to init the picking info.

The other pointer events should work without a problem. for example pointer down: [The UI through | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#TMYC3W#2)

---

<div class="post-metadata">

**Author:** ![kekeqy](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/kekeqy/32/12447_2.png) [@kekeqy](https://forum.babylonjs.com/u/kekeqy)\
**Post date:** [June 11, 2021, 8:57am UTC](https://forum.babylonjs.com/t/how-to-make-the-ui-respond-to-mouse-events-and-also-penetrate-the-ui/21589/3 "2021-06-11T08:57:55Z")

</div>

It works once.But it’s kind of weird, the first time you click, then you can’t click.

---

<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:** [June 11, 2021, 9:08am UTC](https://forum.babylonjs.com/t/how-to-make-the-ui-respond-to-mouse-events-and-also-penetrate-the-ui/21589/4 "2021-06-11T09:08:14Z")

</div>

yes, you are right. seems like an issue with pointer handling in the UI, as it resets when the mouse pointer exits the canvas and goes back in. @msDestiny14 , want to take a look at that?
