# Gui event problem

**URL:** <https://forum.babylonjs.com/t/gui-event-problem/34640>\
**Category:** Questions\
**Tags:** gui\
**Created:** [October 10, 2022, 8:49am UTC](https://forum.babylonjs.com/t/gui-event-problem/34640 "2022-10-10T08:49:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZoeLeee](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/zoeleee/32/20340_2.png) [@ZoeLeee](https://forum.babylonjs.com/u/ZoeLeee)\
**Post date:** [October 10, 2022, 8:49am UTC](https://forum.babylonjs.com/t/gui-event-problem/34640/1 "2022-10-10T08:49:07Z")

</div>

The gui wheel event prevents the camera wheel event, how to block the gui wheel event, and only keep the gui click event?

> **[Babylon.js Playground](https://playground.babylonjs.com/#XCPP9Y%2316046)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<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:** [October 10, 2022, 11:27am UTC](https://forum.babylonjs.com/t/gui-event-problem/34640/2 "2022-10-10T11:27:51Z")

</div>

You can disable the button’s pointer-blocking ability:

[Simple GUI in fullscreen mode | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#XCPP9Y#16050)

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 10, 2022, 12:42pm UTC](https://forum.babylonjs.com/t/gui-event-problem/34640/3 "2022-10-10T12:42:50Z")

</div>

Hmm,  
I’m sorry to take this opportunity to come bothering you again about this, but it doesn’t seem to quite work like this. Using a button, isPointerBlocker set to false does not allow wheel event. Setting the part of textBlock from the button also to false does not help either.  
Furthermore, creating a rectangle and a textBlock and by default, the rectangle but also the textBlock (which supposed to be a pointerBlocker by default from my understanding) both let the wheel event through. However, even more interesting, specifying that the pointerBlocker should be false (or true) prevents the wheel event?!

Here’s a PG that illustrates this. At least for me (on chrome mac):

> **[Babylon.js Playground](https://playground.babylonjs.com/#XCPP9Y%2316053)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Edit: the button to the right is from a rectangle and the one to the left is a simple button

---

<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:** [October 10, 2022, 12:54pm UTC](https://forum.babylonjs.com/t/gui-event-problem/34640/4 "2022-10-10T12:54:31Z")

</div>

do I understand correctly, that when set to false (pointer blocker) your wheel event is not passed to the scene? i.e. - [Simple GUI in fullscreen mode | Babylon.js Playground (babylonjs.com)](https://playground.babylonjs.com/#XCPP9Y#16054)

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 10, 2022, 1:01pm UTC](https://forum.babylonjs.com/t/gui-event-problem/34640/5 "2022-10-10T13:01:23Z")

</div>

I guess so.

> **[Babylon.js Playground](https://playground.babylonjs.com/#XCPP9Y%2316055)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![mawa](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mawa/32/12384_2.png) [@mawa](https://forum.babylonjs.com/u/mawa)\
**Post date:** [October 10, 2022, 1:06pm UTC](https://forum.babylonjs.com/t/gui-event-problem/34640/6 "2022-10-10T13:06:29Z")

</div>

oops, forget it. typos error 🤐

My apologies, it works (for both button and textBlock):

> **[Babylon.js Playground](https://playground.babylonjs.com/#XCPP9Y%2316056)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes
