Fix scroll handling with modals

This commit is contained in:
Claire committed 2021-07-13 11:07:16 +02:00
1 parent 6e3d5cbca2
commit 99f28c17de
5 files changed
+5 -8

No files matched your search

@@ -105,8 +105,7 @@ class AccountGallery extends ImmutablePureComponent {
}
shouldUpdateScroll = (prevRouterProps, { location }) => {
if ((((prevRouterProps || {}).location || {}).state || {}).mastodonModalOpen) return false;
return !(location.state && location.state.mastodonModalOpen);
return !(prevRouterProps?.location?.state?.mastodonModalKey || location.state?.mastodonModalKey);
}
setColumnRef = c => {
@@ -508,8 +508,7 @@ class Status extends ImmutablePureComponent {
}
shouldUpdateScroll = (prevRouterProps, { location }) => {
if ((((prevRouterProps || {}).location || {}).state || {}).mastodonModalOpen) return false;
return !(location.state && location.state.mastodonModalOpen);
return !(prevRouterProps?.location?.state?.mastodonModalKey || location.state?.mastodonModalKey);
}
render () {