Give developers direct control over TextBox focus state

As a developer, it is currently impossible to keep TextBoxes focused when a user interacts with another UI element (such as scrolling a ScrollingFrame or clicking a button). This makes our use case impossible because we want users to be able to scroll a list of text colours whilst editing their text. See example:

It’s not clear in the video, but clicking on any of the colours above the keyboard or attempting to scroll through them forces the textbox to unfocus. We attempt to fix this by listening to FocusLost and calling CaptureFocus in the same frame, but this results in an infinite focus and unfocus loop that can’t be broken out of. Waiting any longer than a frame causes the keyboard to disappear and ruins UX.

We need a way to disable Roblox’s default unfocus behaviour per TextBox.

24 Likes

This would be immensely useful for letting players edit the properties of text while having their keyboard opened & typing!

3 Likes

This has caused me some super frustrating issues with keyboards disappearing, this would be a fantastic addition.

2 Likes

Yep! I can do nothing to prevent the keyboard from disappearing here; I’ve done the absolute best I can do. We really need this issue resolved ASAP.

Currently having to work around this as well, really degrading the user experience in my experience. Only way around it has been waiting a short amount before calling CaptureFocus again but this results in a jumpy keyboard.

Not sure if anyone has a better way around this atm since calling CaptureFocus too soon will prevent the keyboard from displaying.

1 Like

After a recent update of either IOS or Roblox itself every way I’ve found to circumvent this issue doesn’t work anymore. This means that I have to wait for more than 500ms to get the keyboard to popup again after textbox focus is lost.

This completely ruins the flow in my upcoming ‘app’ on the Roblox platform. Exposing this (currently private) API would fix all these issues from my point of view.

The fix @grilme99 and team implemented for ‘Clip It’ seems to be broken as well on my device (iPhone 15 Pro).


Previously the keyboard would go down and directly up again.

1 Like