# onPointerDown strangeness

**URL:** <https://forum.babylonjs.com/t/onpointerdown-strangeness/20380>\
**Category:** Bugs\
**Tags:** gui\
**Created:** [April 28, 2021, 1:49am UTC](https://forum.babylonjs.com/t/onpointerdown-strangeness/20380 "2021-04-28T01:49:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blindinghues](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blindinghues/32/15289_2.png) [@blindinghues](https://forum.babylonjs.com/u/blindinghues)\
**Post date:** [April 28, 2021, 1:49am UTC](https://forum.babylonjs.com/t/onpointerdown-strangeness/20380/1 "2021-04-28T01:49:30Z")

</div>

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

Another GUI question… If you click on the container, the pointer down will be registered. If you click again, it doesn’t look like it is. Even if you move the mouse off the container, click somewhere else on the canvas, and then click on it again, same result.

If however, you click out of the canvas and onto the playground text area, and then click back on the container, the pointer down is registered again 🤔

Strange behavior, but maybe I’m missing something? Looks to function like this on both Chrome and Firefox, haven’t tested anything else yet.

This behavior seems to be unique to the container, and doesn’t afflict other child controls like ‘Button’. I’d rather not use button though, and am instead constructing custom GUI components at a higher level in a similar fashion to the DOM (nested divs effectively).

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 28, 2021, 10:32am UTC](https://forum.babylonjs.com/t/onpointerdown-strangeness/20380/2 "2021-04-28T10:32:41Z")

</div>

You should set `isPointerBlocker = true` on the GUI element:

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

---

<div class="post-metadata">

**Author:** ![blindinghues](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blindinghues/32/15289_2.png) [@blindinghues](https://forum.babylonjs.com/u/blindinghues)\
**Post date:** [April 29, 2021, 1:44am UTC](https://forum.babylonjs.com/t/onpointerdown-strangeness/20380/3 "2021-04-29T01:44:08Z")

</div>

Of course, thank-you!
