Skip to content

Fix chat focus on blur, whisper/team command clearing, and emoji in the chatbox - #97

Merged
CoderDayton merged 3 commits into
mainfrom
fix/chat-focus-and-command-clear
Nov 11, 2026
Merged

CoderDayton merged 3 commits into
mainfrom
fix/chat-focus-and-command-clear

Conversation

@dim-ghub

Copy link
Copy Markdown
Collaborator

Three chatbox fixes, one commit each.

Keep the chatbox focused when the window loses focus

Clipboard managers and emoji pickers take window focus briefly, then paste or type back into the window. Losing focus used to release the Roblox TextBox and stop SDL text input, so the chatbox closed before the text arrived. Focus loss now only releases held keys, mouse buttons and touches.

Clear the chatbox after /w name and /t

TextChatService clears the box when it switches to a whisper or team channel. On an empty update from the engine, the editor threw away its record of the text it had recently sent to Roblox. Roblox echoes that text back late, so after the clear an echo like /w name looked like a new edit from the game and put the command back. An empty update now removes only empty entries from that record, so late echoes are still recognised and ignored. Adds a regression test.

Draw emoji in the chatbox overlay

Emoji showed up as blank space. SDL_ttf 3.2's surface text engine sizes each glyph from its outline, and Roblox's TwemojiMozilla is a COLR font whose base outlines are empty, so emoji kept their width but drew nothing. After the text is drawn, any multi-byte character whose area is still blank is filled in with TTF_RenderText_Blended, which draws the color layers.

Testing

  • Full unit suite passes (2298 tests).
  • Checked in game: pasting from a clipboard manager and an emoji picker into chat, /w and /t clearing the box, and emoji showing in the chatbox.

Clipboard managers and emoji pickers take window focus for a moment and then
paste or type back into the window. Losing focus used to release the Roblox
TextBox and stop SDL text input, so the chatbox closed before the text arrived.
Focus loss now only releases held keys, buttons and touches.
TextChatService clears the chat box after "/w name " or "/t ". The editor
dropped every echo tombstone on an empty engine update, so the engine's
delayed echoes of the typed command were treated as new Lua edits and put
the command text back. An empty update now only consumes empty tombstones.
SDL_ttf 3.2's surface text engine sizes each glyph from its outline. Roblox's
TwemojiMozilla is a COLR font whose base outlines are empty, so emoji kept
their advance but drew nothing and showed up as spaces. After drawing the
text, fill any multi-byte cluster that is still blank with
TTF_RenderText_Blended, which renders the color layers.
@CoderDayton
CoderDayton merged commit aec94e6 into main Nov 11, 2026
6 checks passed
@CoderDayton
CoderDayton deleted the fix/chat-focus-and-command-clear branch November 11, 2026 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants