Issue Type: Display
Impact: High
Frequency: Constantly
Date First Experienced: 2021-05-10 00:05:00 (+00:00)
Date Last Experienced: 2021-05-10 00:05:00 (+00:00)
Reproduction Steps:
- Create a DockWidgetPluginGui.
- Create a TextBox within the widget.
- Call TextBox:CaptureFocus().
Reproduction plugin script (save as TestFocus.lua
in local plugins folder):
local panel = plugin:CreateDockWidgetPluginGui(
"TestFocusPanel",
DockWidgetPluginGuiInfo.new(
Enum.InitialDockState.Float,
false, -- initEnabled
true, -- overrideEnabledRestore
100, 100, -- floatSize
100, 100 -- minSize
)
)
local textbox = Instance.new("TextBox")
textbox.Size = UDim2.new(1,0,1,0)
textbox.Text = "Text"
textbox.Font = Enum.Font.SourceSans
textbox.TextSize = 14
textbox.TextXAlignment = Enum.TextXAlignment.Left
textbox.ClearTextOnFocus = false
textbox.Parent = panel
panel.Name = "TestFocusPanel"
panel.Title = "Test Focus"
panel.Enabled = true
textbox.Focused:Connect(function()
print("TEXTBOX FOCUSED")
end)
textbox.FocusLost:Connect(function()
print("TEXTBOX BLURRED")
end)
panel.WindowFocused:Connect(function()
print("WINDOW FOCUSED")
end)
panel.WindowFocusReleased:Connect(function()
print("WINDOW BLURRED")
end)
print("CAPTURING FOCUS...")
wait(3)
textbox:CaptureFocus()
Expected Behavior:
When TextBox:CaptureFocus()
is called to focus the TextBox, the widget containing the TextBox is also focused.
Actual Behavior:
While the TextBox is correctly focused, the widget is not, preventing input to the TextBox.
Workaround: