diff --git a/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs b/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs index 8052e0010c1d..91900cb78d26 100644 --- a/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs +++ b/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs @@ -1247,7 +1247,7 @@ public void PasteFromClipboard() #if __SKIA__ try { - + _clearHistoryOnTextChanged = false; _suppressCurrentlyTyping = true; #else { @@ -1258,6 +1258,7 @@ public void PasteFromClipboard() finally { _suppressCurrentlyTyping = false; + _clearHistoryOnTextChanged = true; } #endif diff --git a/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.skia.cs b/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.skia.cs index ae1b72a05baf..4fa66e4d503d 100644 --- a/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.skia.cs +++ b/src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.skia.cs @@ -57,7 +57,7 @@ public partial class TextBox private string _textWhenTypingStarted; private int _historyIndex; - private List _history = new(); // the selection of an action is what was selected right before it happened. Might turn out to be unnecessary. + private readonly List _history = new(); // the selection of an action is what was selected right before it happened. Might turn out to be unnecessary. private (int start, int length, bool tripleTap)? _multiTapChunk; private (int hashCode, List<(int start, int length)> chunks) _cachedChunks = (-1, new());