Skip to content

Commit b52866b

Browse files
committed
Update ShellPanesPage.xaml.cs
1 parent b52c88e commit b52866b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Files.App/Views/ShellPanesPage.xaml.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -647,9 +647,13 @@ private void Pane_Loaded(object sender, RoutedEventArgs e)
647647

648648
private void Pane_GettingFocus(UIElement sender, GettingFocusEventArgs args)
649649
{
650-
// Workaround for https://github.com/files-community/Files/issues/15397
651-
if (args?.NewFocusedElement is not null && args.NewFocusedElement is not (ListViewItem or GridViewItem or ListView or GridView))
652-
args.TryCancel();
650+
try
651+
{
652+
// Workaround for https://github.com/files-community/Files/issues/15397
653+
if (args?.NewFocusedElement is not null && args.NewFocusedElement is not (ListViewItem or GridViewItem or ListView or GridView))
654+
args.TryCancel();
655+
}
656+
catch (Exception) { }
653657
}
654658

655659
private void Pane_ContentChanged(object? sender, TabBarItemParameter e)

0 commit comments

Comments
 (0)