From 18ba411537649851b365b439046372a1d80f61ef Mon Sep 17 00:00:00 2001 From: Marco Gavelli Date: Sun, 22 Dec 2024 02:03:37 +0100 Subject: [PATCH] Do not switch focus if pane is already active --- src/Files.App/Views/ShellPanesPage.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Files.App/Views/ShellPanesPage.xaml.cs b/src/Files.App/Views/ShellPanesPage.xaml.cs index 05df40ffa980..857bba34727b 100644 --- a/src/Files.App/Views/ShellPanesPage.xaml.cs +++ b/src/Files.App/Views/ShellPanesPage.xaml.cs @@ -646,7 +646,8 @@ private void Pane_ContentChanged(object? sender, TabBarItemParameter e) private void Pane_PointerPressed(object sender, PointerRoutedEventArgs e) { - (sender as UIElement)?.Focus(FocusState.Pointer); + if (sender != ActivePane && sender is IShellPage shellPage && shellPage.SlimContentPage is not ColumnsLayoutPage) + (sender as UIElement)?.Focus(FocusState.Pointer); } private void Pane_GotFocus(object sender, RoutedEventArgs e)