diff --git a/src/Files.App/Views/Shells/ModernShellPage.xaml.cs b/src/Files.App/Views/Shells/ModernShellPage.xaml.cs index ed83ff0a2f6e..31fd362725bf 100644 --- a/src/Files.App/Views/Shells/ModernShellPage.xaml.cs +++ b/src/Files.App/Views/Shells/ModernShellPage.xaml.cs @@ -173,6 +173,11 @@ private async void ItemDisplayFrame_Navigated(object sender, NavigationEventArgs if (parameters.IsLayoutSwitch) FilesystemViewModel_DirectoryInfoUpdated(sender, EventArgs.Empty); + // Update the ShellViewModel with the current working directory + // Fixes https://github.com/files-community/Files/issues/17469 + if (parameters.IsSearchResultPage == false) + ShellViewModel.IsSearchResults = false; + _navigationInteractionTracker.CanNavigateBackward = CanNavigateBackward; _navigationInteractionTracker.CanNavigateForward = CanNavigateForward; }