Allow developer use of TextBox.ManualFocusRelease

The TextBox.ManualFocusRelease (TextBox | Documentation - Roblox Creator Hub) property should be open for use generally within the engine, rather than locked to CoreScripts.

My use case for this property is being able to click other buttons whilst a piece of text is selected within a TextBox, so that I can act upon the selected text. Right now, there is no proper way to do this, as the focus of the TextBox is lost before the clicking a button, so I lose the CursorPosition and SelectionStart property values

5 Likes

I think the main reason behind not publicizing this API was the risk of a faulty program getting the user stuck inside of a textbox they can’t close without exiting the game.

I’m all for opening this API up to support use cases like the one you mentioned, however there should definitely be a way for the user to escape the textbox in the event that something goes wrong and they are unable to.

That exact scenario is already possible with TextBox:CaptureFocus(), if it is called every time focus is lost or on every render step. It’s more likely that this API isn’t yet available because of some sort of edge case or undefined behaviour, and it’s been deemed low priority.

2 Likes