PcoWSkbVqDnWTu_dm2ix
The Developer Hub is now deprecated and information on this page may no longer be accurate. To see our new and improved documentation, please click here. You can read more about the future of documentation here.
Collapse Sidebar

TextBoxFocusReleased

The TextBoxFocusReleased event fires when a client loses focus on a TextBox - typically when a client stops text entry into a TextBox by pressing return or clicking/touching elsewhere on the screen.

For example, the code below prints the the name of the TextBox losing focus when the event fires.

local UserInputService = game:GetService("UserInputService")

function TextBoxFocusReleased(textbox)
	print(textbox.Name)
end

UserInputService.TextBoxFocusReleased:Connect(TextBoxFocusReleased)

It can be used alongside UserInputService/TextBoxFocused to track when a TextBox gains and loses focus.

As this event only fires locally, it can only be used in a LocalScript.

See also

  • UserInputService/GetFocusedTextBox
  • TextBox/Focused
  • TextBox/FocusLost

Parameters

Name Type Default Description

The TextBox that lost focus


Code Samples


TextBoxFocusReleased

This example prints the "The name of the released focus TextBox is " followed by the name of the TextBox which is released from focus when a client escapes text entry for a TextBox, usually by clicking/tapping elsewhere on the screen.