# Inconsistent event triggers with TextBlock

**URL:** <https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577>\
**Category:** Bugs\
**Tags:** gui\
**Created:** [June 10, 2021, 6:55pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577 "2021-06-10T18:55:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Scherotter](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter/32/4720_2.png) [@Michael\_Scherotter](https://forum.babylonjs.com/u/Michael_Scherotter)\
**Post date:** [June 10, 2021, 6:55pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/1 "2021-06-10T18:55:19Z")

</div>

I am trying to create a GUI with a ScrollViewer that has TextBlock items that are clickable. I am finding the pointer click very inconsistent in this playground. Any suggestions?  
[https://playground.babylonjs.com/#HJZBRG#198](https://playground.babylonjs.com/#HJZBRG#198)

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [June 10, 2021, 8:24pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/2 "2021-06-10T20:24:56Z")

</div>

Adding @msDestiny14

---

<div class="post-metadata">

**Author:** ![msDestiny14](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/msdestiny14/32/9572_2.png) [@msDestiny14](https://forum.babylonjs.com/u/msDestiny14)\
**Post date:** [June 10, 2021, 8:33pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/3 "2021-06-10T20:33:37Z")

</div>

Ah, took me a second to see the issue you’re having. Let me take a look. 🙂

---

<div class="post-metadata">

**Author:** ![msDestiny14](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/msdestiny14/32/9572_2.png) [@msDestiny14](https://forum.babylonjs.com/u/msDestiny14)\
**Post date:** [June 10, 2021, 9:59pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/4 "2021-06-10T21:59:10Z")

</div>

So I went down to the lowest level possible to try to see if it was a bug or not. Based on a test I made it doesn’t appear to be a bug but rather a mistake somewhere in the demo (where. I’m not sure ☹ ) [https://playground.babylonjs.com/#XCPP9Y#7652](https://playground.babylonjs.com/#XCPP9Y#7652)

One thing I did notice I was missing which led me to get the initial same result as you was not including IsPointerBlocker = true; I’m also wondering if its selecting the stack panels or something else rather than the text.

Edit: OH! wait a minute, it appears something I didn’t see was CreateFullscreenUI vs CreateForMesh. This might be a bug. 🤔

Edit 2: Sorry for all the edits, just updating as I’m debugging. Made a new test here with CreateForMesh which is also working. [https://playground.babylonjs.com/#XCPP9Y#7653](https://playground.babylonjs.com/#XCPP9Y#7653) so at this point it’s probably a mistake within the demo.

---

<div class="post-metadata">

**Author:** ![Michael\_Scherotter](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter/32/4720_2.png) [@Michael\_Scherotter](https://forum.babylonjs.com/u/Michael_Scherotter)\
**Post date:** [June 10, 2021, 10:34pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/5 "2021-06-10T22:34:31Z")

</div>

so what would I need to do with my demo to make the click events consistent?

---

<div class="post-metadata">

**Author:** ![SahilTara](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@SahilTara](https://forum.babylonjs.com/u/SahilTara)\
**Post date:** [June 10, 2021, 11:58pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/6 "2021-06-10T23:58:57Z")

</div>

Hiii, I was looking at this with @msDestiny14 for a bit, and after playing around a bit we think we have found the solution. Here is the working version with consistent clicking: [http://playground.babylonjs.com/#HJZBRG#201](http://playground.babylonjs.com/#HJZBRG#201).  
So it seems like the issue was at line 43 with the /2 that was being used. After removing this /2, everything seems to work correctly!

---

<div class="post-metadata">

**Author:** ![msDestiny14](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/msdestiny14/32/9572_2.png) [@msDestiny14](https://forum.babylonjs.com/u/msDestiny14)\
**Post date:** [June 11, 2021, 12:01am UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/7 "2021-06-11T00:01:25Z")

</div>

Way to go @SahilTara !

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [June 11, 2021, 3:51pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/8 "2021-06-11T15:51:52Z")

</div>

Well done buddy!

---

<div class="post-metadata">

**Author:** ![Michael\_Scherotter](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/michael_scherotter/32/4720_2.png) [@Michael\_Scherotter](https://forum.babylonjs.com/u/Michael_Scherotter)\
**Post date:** [June 11, 2021, 3:57pm UTC](https://forum.babylonjs.com/t/inconsistent-event-triggers-with-textblock/21577/9 "2021-06-11T15:57:03Z")

</div>

That was it - z-fighting.  
Thanks,  
Michael
