Skip to content

Commit ad9cf73

Browse files
authored
Fix: Fixed scrolling to the last item when typing name in the column layout (#11741)
1 parent 30a11c7 commit ad9cf73

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Files.App/Views/LayoutModes/ColumnViewBase.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ protected override void ItemManipulationModel_ScrollIntoViewInvoked(object? send
8585

8686
protected override void ItemManipulationModel_FocusSelectedItemsInvoked(object? sender, EventArgs e)
8787
{
88-
FileList.ScrollIntoView(FileList.Items.Last());
88+
if (SelectedItems.Any())
89+
{
90+
FileList.ScrollIntoView(SelectedItems.Last());
91+
(FileList.ContainerFromItem(SelectedItems.Last()) as ListViewItem)?.Focus(FocusState.Keyboard);
92+
}
8993
}
9094

9195
protected override void ItemManipulationModel_AddSelectedItemInvoked(object? sender, ListedItem e)

0 commit comments

Comments
 (0)