Skip to content

Commit 5acec20

Browse files
Fix for grid layouts
1 parent bd32545 commit 5acec20

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/Files.App/Views/Layouts/GridLayoutPage.xaml.cs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -670,10 +670,18 @@ checkBox.DataContext is ListedItem item &&
670670

671671
private void ItemSelected_Unchecked(object sender, RoutedEventArgs e)
672672
{
673-
if (sender is CheckBox checkBox &&
674-
checkBox.DataContext is ListedItem item &&
675-
FileList.SelectedItems.Contains(item))
676-
FileList.SelectedItems.Remove(item);
673+
if (sender is CheckBox checkBox)
674+
{
675+
if (checkBox.DataContext is ListedItem item && FileList.SelectedItems.Contains(item))
676+
FileList.SelectedItems.Remove(item);
677+
678+
// Workaround for #17298
679+
checkBox.IsTabStop = false;
680+
checkBox.IsEnabled = false;
681+
checkBox.IsEnabled = true;
682+
checkBox.IsTabStop = true;
683+
FileList.Focus(FocusState.Programmatic);
684+
}
677685
}
678686

679687
private new void FileList_ContainerContentChanging(ListViewBase sender, ContainerContentChangingEventArgs args)

0 commit comments

Comments
 (0)