diff --git a/src/components/dropdown-menu/dropdown-menu.tsx b/src/components/dropdown-menu/dropdown-menu.tsx index 8a2d0da4ea..cc28011feb 100644 --- a/src/components/dropdown-menu/dropdown-menu.tsx +++ b/src/components/dropdown-menu/dropdown-menu.tsx @@ -243,7 +243,7 @@ const DropdownMenu = (props: IDropdownMenu) => { history.push(pathname, { ...(state as any), soapboxDropdownKey: dropdownHistoryKey.current }); unlistenHistory.current = history.listen(({ state }, action) => { - if (!(state as any)?.soapboxModalKey) { + if (!(state as any)?.soapboxDropdownKey) { handleClose(); } else if (action === 'POP') { handleClose(false); diff --git a/src/init/soapbox-mount.tsx b/src/init/soapbox-mount.tsx index ab7b1b6138..61dc3a4b8d 100644 --- a/src/init/soapbox-mount.tsx +++ b/src/init/soapbox-mount.tsx @@ -38,7 +38,8 @@ const SoapboxMount = () => { // @ts-ignore: I don't actually know what these should be, lol const shouldUpdateScroll = (prevRouterProps, { location }) => - !(location.state?.soapboxModalKey && location.state?.soapboxModalKey !== prevRouterProps?.location?.state?.soapboxModalKey); + !(location.state?.soapboxModalKey && location.state?.soapboxModalKey !== prevRouterProps?.location?.state?.soapboxModalKey) + && !(location.state?.soapboxDropdownKey && location.state?.soapboxDropdownKey !== prevRouterProps?.location?.state?.soapboxDropdownKey); return (