From a0dcd9e106b57507d26c27f51e091d901cbb5376 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 4 Aug 2018 15:11:13 +0100 Subject: [PATCH] Clear selection when a text field's contents is changed programatically. --- OpenRA.Mods.Common/Widgets/TextFieldWidget.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs b/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs index f9209fa0d5..51aa9fe258 100644 --- a/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs +++ b/OpenRA.Mods.Common/Widgets/TextFieldWidget.cs @@ -32,6 +32,7 @@ namespace OpenRA.Mods.Common.Widgets { text = RemoveInvalidCharacters(value ?? ""); CursorPosition = CursorPosition.Clamp(0, text.Length); + ClearSelection(); } }