In-game chat window does not respect sunk inputs

The chat window comes into focus when panning the thumbstick - or any other sunk input - over the chat UI.
This is because the chat window ignores sunk states (aka gameProcessedEvent).

For players, this is disruptive and frustrating during gameplay - If you move the thumbstick too high on your phone, you lose visibility over a quarter of your screen by walking around normally, or panning your camera.

For developers, this breaks our careful ContextActionService input sinking code. Dragging something across the screen isn’t expected to activate the chat window.

Fix


This happens because the chat window uses a UI event like GuiObject.InputBegan or GuiObject.MouseOver to listen when a cursor or finger passes over the window. These events fire before ContextActionService bindings, so they cannot respect ContextActionResult.Sink.

The Chat team can fix this by using ContextActionService bindings, or UserInputService events with gameProcessedEvent to check when the mouse is actually over the UI.

The attached repro should make it possible for an engineer to verify a fix - A script is sinking every possible ContextActionService input, but the chat window is still appearing. The expectation is for the background to never appear when every input is sinking.

ChatBugReport.rbxl (57.1 KB)

Workaround


This can be worked around partially by disabling the chat window completely when touch or mouse inputs are being sunk, via the ChatActive SetCore UI. This workaround does not work as a general solution because you should still be able to view chats when you are walking around with your avatar or panning the camera.

3 Likes

Thanks for the report! We’ll follow up when we have an update for you.