TextButton click is not detected when covered by a child UI element

Reproduction Steps
Repro file: repro.rbxl (40.2 KB)

Reproduction steps:

  1. Open the Repro File in Roblox Studio
  2. Change Device Type to any mobile device. (e.g. iPhone XR)
  3. Test play
  4. Click the UI buttons on your screen.

When the button detects a click, it displays the word “Clicked” over it.

Here’s a visual of the bug:

As you can see, PC players can click anywhere on the button and the click will register just fine. However, mobile players must click on the “border” of the button (which is the only part of the button not covered by an inner frame).

Expected Behavior
When clicking in the center of the buttons, I expect them to detect my click and display the word “Clicked”. However, since there is a Frame inside of the button, you must click outside the frame in order for the click to register. On PC, a click anywhere on the button will register, unlike this current behavior on mobile.

Actual Behavior
While clicking the center of these buttons, the word “Clicked” does not get displayed. You must click on the very edge where the lighter frame does not cover the button in order for the click to be registered on a mobile device. This is unlike playing on computer where any click within the button, even on a Frame that is a child of the button, will still be registered as a button click.

Issue Area: Mobile App
Issue Type: Display
Impact: High
Frequency: Constantly
Date First Experienced: 2021-12-01 00:12:00 (-05:00)

1 Like

This is probably because you have the Active property of the InnerFrame set to true. Disabling that fixes the problem.

https://developer.roblox.com/en-us/api-reference/property/GuiObject/Active

The active property blocks input from going through (such as ClickDetectors) and that includes touch tap. I believe MouseButton1Click ignores this property? It’s not too consistent.

2 Likes

Even if it is the Active property, it still doesn’t explain why it is inconsistent between PC and Mobile devices.

On PC I can click anywhere on the button and it registers, on Mobile only the part not covered on the frame registers clicks.

EDIT: Turning the Active property to false does fix my problem and allow clicks anywhere on the button, however the inconsistency between PC and Mobile remains, so this is still a bug.

We have a property for consistent behavior called “Activated” on buttons. Mouse buttons has some regression that we had to take care of that might have slight differences between mobile and desktop.

3 Likes