Custom Textbox using ChatInputBarConfiguration does not Focus on Keybind Pressed

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

6 Likes

Hey, can you upload your rbxl file? That would help the engineers a lot!

3 Likes

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)

1 Like

Is there any update on the situation here? I’m currently experiencing this in my game as well…

1 Like

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.

2 Likes

As of September 20th, 2023, it continues to still not be fixed. This is a major issue for games that want to use this custom behaviour.

1 Like

As of October 11th, this issue still occurs! I am surprised this has not been fixed yet

2 Likes

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 :frowning:

1 Like

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).

Any updates? Still having this issue in my game where I cannot focus the textbox with “:CaptureFocus()” or using the keybind.

Currently, no update so far at all

fix these small bugs already

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.

1 Like

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.

3 Likes

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.

this is actually such a huge disappointment

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

1 Like

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

I did make a mistake as it is meant to be ChatInputBarConfiguration.TargetTextChannel:SendAsync("String"). It is still a bypass nonetheless

1 Like

Bump. This still has not been fixed despite it being a year


I still need to click on the textbox to focus it as shown here

1 Like

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.

4 Likes