Skip to content

Commit 8e66bc9

Browse files
Fix: Switch focus to the primary pane when closing dual pane mode (#12213)
1 parent 4fdf64f commit 8e66bc9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public bool IsRightPaneActive
2828

2929
public event EventHandler<TabItemArguments> ContentChanged;
3030

31-
public event PropertyChangedEventHandler PropertyChanged;
31+
public event PropertyChangedEventHandler? PropertyChanged;
3232

3333
public IFilesystemHelpers FilesystemHelpers
3434
=> ActivePane?.FilesystemHelpers;
@@ -308,6 +308,7 @@ public void CloseActivePane()
308308
{
309309
// NOTE: Can only close right pane at the moment
310310
IsRightPaneVisible = false;
311+
PaneLeft.Focus(FocusState.Programmatic);
311312
}
312313

313314
private void Pane_Loaded(object sender, RoutedEventArgs e)
@@ -353,9 +354,9 @@ private void PaneResizer_ManipulationStarted(object sender, ManipulationStartedR
353354

354355
public class PaneNavigationArguments
355356
{
356-
public string LeftPaneNavPathParam { get; set; } = null;
357-
public string LeftPaneSelectItemParam { get; set; } = null;
358-
public string RightPaneNavPathParam { get; set; } = null;
359-
public string RightPaneSelectItemParam { get; set; } = null;
357+
public string? LeftPaneNavPathParam { get; set; } = null;
358+
public string? LeftPaneSelectItemParam { get; set; } = null;
359+
public string? RightPaneNavPathParam { get; set; } = null;
360+
public string? RightPaneSelectItemParam { get; set; } = null;
360361
}
361362
}

0 commit comments

Comments
 (0)