Skip to content

Commit

Permalink
fix(textbox): accurately clear pending selections even when they're e…
Browse files Browse the repository at this point in the history
…qual to the current selection
  • Loading branch information
ramezgerges committed Jan 30, 2025
1 parent f09c944 commit 5b2cd09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1309,6 +1309,10 @@ public void Select(int start, int length)
length = textLength - start;
}

#if __SKIA__
_pendingSelection = null;
#endif

if (SelectionStart == start && SelectionLength == length)
{
return;
Expand Down
1 change: 0 additions & 1 deletion src/Uno.UI/UI/Xaml/Controls/TextBox/TextBox.skia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ partial void OnFocusStateChangedPartial(FocusState focusState)

partial void SelectPartial(int start, int length)
{
_pendingSelection = null;
TrySetCurrentlyTyping(false);

if (!_inSelectInternal)
Expand Down

0 comments on commit 5b2cd09

Please sign in to comment.