GuiObject interaction behavior is inconsistent between platforms. For example:
A Frame whose Active property is equal to true will sink the input of and prevent it’s parent’s (a GuiButton) Activated event from firing when the input medium is via Touch - whereas the input is not sunk when the input medium is via Mouse.
A repro file and repro steps can be found below:
inconsistent-mouse-touch-user-input-sink-gui-object-behavior.rbxl (64.2 KB)
Steps to reproduce:
- Enter Play Mode
- Click in both the green and purple area
- Note how the
TextButtonInstance is printed when clicked on in both areas - Enable the Device Emulator and select a mobile device
- Click in both the green and purple area
- Note how the
TextButtonInstance is only printed when clicked on in the green area
Optionally, disable the Active property of the Frame that is parented to the TextButton and repeat steps 1 - 6. Note that now, in both cases where input is either Mouse or Touch, the Activated event fires from clicking anywhere in the TextButton. This is the source of the inconsistent input behavior
Expected behavior
As is the behavior for mouse-based input, the Activated event should fire when a GuiButton is clicked on, regardless of the Active property of any descendant GuiObject of that GuiButton
This can be tested by connecting to the InputEnded event to detect when the Frame’s Active property is equal to true, noting that even though it is true, the behavior is not sunk by the GuiButton it is parented to when the input medium is via Mouse