fix scroll
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
d6fba3ad13
commit
6ea766d93b
2 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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 (
|
||||
<SiteErrorBoundary>
|
||||
|
|
Loading…
Reference in a new issue