When using a custom textbox through ChatInputBarConfiguration.TextBox, the keybind for focusing the textbox does not work no matter what I do. Since I cannot use TextBox:CaptureFocus() through scripts, I am forced to require all users to click on the textbox to be able to chat. This makes it impossible for PC players to be able to chat when their mouse is locked.
I also noticed it doesn’t have IsFocused set to true when the textbox is focused either. Is all of this an oversight, perhaps?
Video:
I ensured to show the code of the chatbox to show it’s not my code blocking the interaction
Expected behavior
The custom textbox is focused when pressing the keybind set through ChatInputBarConfiguration.KeyboardKeyCode.
System information
OS: Windows 11
CPU: Intel(R) Core™ i7-9750H CPU @ 2.60Hz
GPU (0): Intel(R) UHD Graphics 630
GPU (1): NVIDIA GeForce GTX 1660 Ti
Update
There is a workaround to this issue that you can use for now
Here is an exact replication of it with an added comment to the script I showed in the video. Everything is inside the StarterGui! ChatInputBarConfiguration TextBox Bug.rbxl (48.6 KB)
As of July 7th, 2023, this is still not fixed. It is 11 days until a whole month this issue has existed. I am hoping it gets patched soon as this makes it infuriating for users who want to make a completely custom chat system using TextChatService.
It is a bit of an exerience breaker, it seems the only workaround is to instruct players to enable UI navigation and use that to select the chat textbox while the mouse is locked
Any update? We want to use TextChatService for a while in Frappé but this bug is a dealbreaker. We want to use a custom TextBox because we have existing features which require direct access to the textbox (i.e. connecting to events).
how is this not fixed yet… ROBLOX… if you aren’t going to let us use the key bind to focus the textbox, then why aren’t you letting us use :CaptureFocus() ???
for now I’m just going to use the default textbox which is no way close to style my chat UI is and is not even in the right spot that my custom chat is in.
I believe it might be colliding with this since Roblox disabled CaptureFocus due to security reasons, I really hope this gets fixed soon since It makes this unusable.
okay this has been up for more than a year this is incredibly stupid. what the hell are the “engineers” doing because this is one of the biggest and most annoying things ever, and can be fixed so simply.
right now a temporary solution is to send a remotevent to the server and filter the message on the server from a clients textbox and send it to all clients.
so basically recreating some of the chat system, I should not have to do this.
You actually can just use ChatInputBarConfiguration.TargetTextChannel:SendAsync("String") to send messages. Just have it send a result of a textbox not connected to the ChatInputBarConfiguration instance. A simple code like
TextBox.FocusLost:Connect(function(EnterPressed:boolean)
if EnterPressed == true then
local TextChannel = ChatInputBarConfiguration.TargetTextChannel
if TextChannel then
TextChannel:SendAsync(TextBox.Text)
end
end
end)
UserInputService.InputBegan:Connect(function(Input:InputObject)
if Input.KetCode == ChatInputBarConfiguration.KeyboardKeyCode then
TextBox:CaptureFocus()
end
end)
I just am frustrated that Roblox has not fixed this issue and the workaround is something that isn’t even hard to do. Hell, it can bypass the :CaptureFocus() restriction and allow you to do it anyways
I never knew the new chat can do that, although that can be a very dangerous function, considering you can make any player say anything, whether filtered or not,
but for now this is the only way, so if I will do this whenever I want to make a custom chat input
Thanks for your patience on this one. This is an important problem to solve and I’m writing to let you know we are now investing resources to address it.