X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/59329caeae17903b97b90b167df5a8122a0c9d95..0d0b7399b2e4906e26dbb5035bed033cec0646e9:/src/routes/route-change-handlers.ts diff --git a/src/routes/route-change-handlers.ts b/src/routes/route-change-handlers.ts index 7b37509f..03e2a38a 100644 --- a/src/routes/route-change-handlers.ts +++ b/src/routes/route-change-handlers.ts @@ -8,6 +8,8 @@ import * as Routes from '~/routes/routes'; import * as WorkbenchActions from '~/store/workbench/workbench-actions'; import { navigateToRootProject } from '~/store/navigation/navigation-action'; import { dialogActions } from '~/store/dialog/dialog-actions'; +import { contextMenuActions } from '~/store/context-menu/context-menu-actions'; +import { searchBarActions } from '~/store/search-bar/search-bar-actions'; export const addRouteChangeHandlers = (history: History, store: RootStore) => { const handler = handleLocationChange(store); @@ -42,6 +44,8 @@ const handleLocationChange = (store: RootStore) => ({ pathname }: Location) => { const linksMatch = Routes.matchLinksRoute(pathname); store.dispatch(dialogActions.CLOSE_ALL_DIALOGS()); + store.dispatch(contextMenuActions.CLOSE_CONTEXT_MENU()); + store.dispatch(searchBarActions.CLOSE_SEARCH_VIEW()); if (projectMatch) { store.dispatch(WorkbenchActions.loadProject(projectMatch.params.id));