Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Files.App/Views/Layouts/ColumnLayoutPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,11 @@ private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)
else
{
CloseFolder();

// Clear selection when clicking empty area via touch
// https://github.com/files-community/Files/issues/15051
if (e.PointerDeviceType == PointerDeviceType.Touch)
ItemManipulationModel.ClearSelection();
}
}

Expand Down
7 changes: 7 additions & 0 deletions src/Files.App/Views/Layouts/DetailsLayoutPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,13 @@ private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)
await CommitRenameAsync(textBox);
}
}
else
{
// Clear selection when clicking empty area via touch
// https://github.com/files-community/Files/issues/15051
if (e.PointerDeviceType == PointerDeviceType.Touch)
ItemManipulationModel.ClearSelection();
}
return;
}

Expand Down
7 changes: 7 additions & 0 deletions src/Files.App/Views/Layouts/GridLayoutPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,14 @@ private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)

var item = (e.OriginalSource as FrameworkElement)?.DataContext as ListedItem;
if (item is null)
{
// Clear selection when clicking empty area via touch
// https://github.com/files-community/Files/issues/15051
if (e.PointerDeviceType == PointerDeviceType.Touch)
ItemManipulationModel.ClearSelection();

return;
}

// Skip code if the control or shift key is pressed or if the user is using multiselect
if (ctrlPressed ||
Expand Down
Loading