# Locking the generic input when gui button is clicked

**URL:** <https://forum.babylonjs.com/t/locking-the-generic-input-when-gui-button-is-clicked/53634>\
**Category:** Questions\
**Created:** [September 22, 2024, 9:06pm UTC](https://forum.babylonjs.com/t/locking-the-generic-input-when-gui-button-is-clicked/53634 "2024-09-22T21:06:09Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [September 23, 2024, 9:23am UTC](https://forum.babylonjs.com/t/locking-the-generic-input-when-gui-button-is-clicked/53634/3 "2024-09-23T09:23:12Z")

</div>

Yes. You can use the pointerBlocker to prevent events to fire, but I think it still records the click in the observable, doesn’t it? I kind of remember something around this. I believe you could detect whether you are clicking on the gui or in scene.

> [@Prevent scrollViewer onWheel event from "propagating" to camera zoom](https://forum.babylonjs.com/t/prevent-scrollviewer-onwheel-event-from-propagating-to-camera-zoom/30969/6):
>
> Yes. So did you actually fix it with this? Else, I would have one more solution (very similar I believe) that has proved to work both on desktop and mobile.

Something around these parts:

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

---

_[View the full topic](https://forum.babylonjs.com/t/locking-the-generic-input-when-gui-button-is-clicked/53634)._
