Skip to content

Commit d0c7ce5

Browse files
committed
Update BaseLayoutPage.cs
1 parent ef23b98 commit d0c7ce5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/Files.App/Views/Layouts/BaseLayoutPage.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,8 +1027,11 @@ protected virtual void Page_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
10271027
}
10281028
}
10291029

1030+
if (!typedCharacter.HasValue)
1031+
return;
1032+
10301033
// Handle valid character input
1031-
if (typedCharacter.HasValue && !Path.GetInvalidFileNameChars().Contains(char.ToLowerInvariant(typedCharacter.Value)))
1034+
if (!Path.GetInvalidFileNameChars().Contains(char.ToLowerInvariant(typedCharacter.Value)))
10321035
{
10331036
var lowerCharString = char.ToLowerInvariant(typedCharacter.Value).ToString();
10341037

@@ -1048,10 +1051,6 @@ protected virtual void Page_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
10481051
{
10491052
switch (pressedKey)
10501053
{
1051-
case VirtualKey.Space:
1052-
shellPage.ShellViewModel.FilesAndFoldersFilter += " ";
1053-
break;
1054-
10551054
case VirtualKey.Back when currentFilter.Length > 1:
10561055
shellPage.ShellViewModel.FilesAndFoldersFilter = currentFilter[..^1];
10571056
break;

0 commit comments

Comments
 (0)