Skip to content

Commit

Permalink
Merge pull request #296 from AvaloniaUI/ignore-control-chars
Browse files Browse the repository at this point in the history
Ignore control characters on text input
  • Loading branch information
maxkatz6 authored Aug 13, 2024
2 parents 2b5532c + 207531a commit b0dd676
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Avalonia.Controls.TreeDataGrid/TreeDataGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ protected override void OnKeyUp(KeyEventArgs e)
protected override void OnTextInput(TextInputEventArgs e)
{
base.OnTextInput(e);

if (e.Text is { Length: > 0 } && char.IsControl(e.Text[0]))
return;

_selection?.OnTextInput(this, e);
}

Expand Down

0 comments on commit b0dd676

Please sign in to comment.