diff --git a/Source/Engine/UI/GUI/Common/TextBoxBase.cs b/Source/Engine/UI/GUI/Common/TextBoxBase.cs index 2e4ef51e3..ac0b3b55f 100644 --- a/Source/Engine/UI/GUI/Common/TextBoxBase.cs +++ b/Source/Engine/UI/GUI/Common/TextBoxBase.cs @@ -504,9 +504,7 @@ namespace FlaxEngine.GUI if (string.IsNullOrEmpty(clipboardText)) return; - var right = SelectionRight; Insert(clipboardText); - SetSelection(Mathf.Max(right, 0) + clipboardText.Length); } /// @@ -626,7 +624,7 @@ namespace FlaxEngine.GUI _text = _text.Insert(left, str); - SetSelection(left + 1); + SetSelection(left + str.Length); } OnTextChanged();