Skip to content

Commit 41ce17c

Browse files
committed
Comments
1 parent f7666f6 commit 41ce17c

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

src/Files.App/ViewModels/ShellViewModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,9 @@ public ShellViewModel(LayoutPreferencesManager folderSettingsViewModel)
584584

585585
private async void LayoutModeChangeRequested(object? sender, LayoutModeEventArgs e)
586586
{
587-
// Layout changes can cause the active pane to lose focus, to prevent this
588-
// from happening, the pane is locked and focus is restored when file loading
589-
// completes, this occurs in the `RefreshItem()` method in BaseLayoutPage.cs.
587+
// Layout changes can cause the active pane to lose focus. To prevent this,
588+
// the pane is locked here and focus is restored when file loading completes
589+
// in the RefreshItem() method in BaseLayoutPage.cs.
590590
// See https://github.com/files-community/Files/issues/15397
591591
// See https://github.com/files-community/Files/issues/16530
592592
ContentPageContext.ShellPage!.PaneHolder.LockActivePane();

src/Files.App/Views/Layouts/BaseLayoutPage.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,9 +1240,9 @@ private void RefreshItem(SelectorItem container, object item, bool inRecycleQueu
12401240
if (ParentShellPageInstance.ShellViewModel.EnabledGitProperties is not GitProperties.None && listedItem is IGitItem gitItem)
12411241
await ParentShellPageInstance.ShellViewModel.LoadGitPropertiesAsync(gitItem);
12421242

1243-
// Layout changes can cause the active pane to lose focus, to prevent this
1244-
// from happening, the pane is locked and focus is restored when file loading
1245-
// completes, the locking occurs in the `LayoutModeChangeRequested()` method in ShellViewModel.cs.
1243+
// Layout changes can cause the active pane to lose focus. To prevent this,
1244+
// the pane is locked in LayoutModeChangeRequested() and focus is restored here
1245+
// when file loading completes.
12461246
// See https://github.com/files-community/Files/issues/15397
12471247
// See https://github.com/files-community/Files/issues/16530
12481248

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -673,14 +673,11 @@ private void Pane_Loaded(object sender, RoutedEventArgs e)
673673

674674
private void Pane_GettingFocus(UIElement sender, GettingFocusEventArgs args)
675675
{
676-
// Layout changes can cause the active pane to lose focus, to prevent this
677-
// from happening, the pane is locked and focus is restored when file loading
678-
// completes.
679-
// The locking occurs in the `LayoutModeChangeRequested()` method in ShellViewModel.cs.
680-
// The focus is restored in the `RefreshItem()` method in BaseLayoutPage.cs
676+
// Cancel focus attempts while the active pane is locked during layout changes.
677+
// Pane locking occurs in LayoutModeChangeRequested() in ShellViewModel.cs.
678+
// Focus is restored in RefreshItem() in BaseLayoutPage.cs when file loading completes.
681679
// See https://github.com/files-community/Files/issues/15397
682680
// See https://github.com/files-community/Files/issues/16530
683-
684681
if (IsActivePaneLocked)
685682
{
686683
IsActivePaneLocked = false;

0 commit comments

Comments
 (0)