diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts index 16c96e65..0be2b610 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts @@ -47,10 +47,17 @@ export const useFileBrowserApp = (basePath: string, rootOverride?: string, urlPa }; /** - * Where a crumb points. A real `To` rather than a query string, because the folder is the pathname now; - * the current search rides along so cmd-clicking a crumb keeps whatever is open. + * Where a crumb points. A real `To` rather than a query string, because the folder is the pathname now. + * + * Drops the overlay, exactly as `setCurrentPath` does. A breadcrumb is a `` and never goes + * through that function, so stripping it in one place and not the other meant clicking a folder row + * closed the pane and clicking a crumb did not — the same navigation, two different outcomes, + * depending on which control you used. */ - const hrefForPath = (path: string) => ({ pathname: folderHref(path), search: location.search }); + const hrefForPath = (path: string) => ({ + pathname: folderHref(path), + search: withoutViewerParams(location.search), + }); /** * The ephemeral viewer params replace each other wholesale: opening a file closes whatever overlay was