diff --git a/packages/volto/news/6523.bugfix b/packages/volto/news/6523.bugfix new file mode 100644 index 0000000000..81d4a50ae7 --- /dev/null +++ b/packages/volto/news/6523.bugfix @@ -0,0 +1 @@ +Disable initial scroll to top after SSR completion. @Faakhir30 diff --git a/packages/volto/src/helpers/ScrollToTop/ScrollToTop.jsx b/packages/volto/src/helpers/ScrollToTop/ScrollToTop.jsx index 8122fbea63..1da8f505e1 100644 --- a/packages/volto/src/helpers/ScrollToTop/ScrollToTop.jsx +++ b/packages/volto/src/helpers/ScrollToTop/ScrollToTop.jsx @@ -37,6 +37,7 @@ class ScrollToTop extends React.Component { const isHash = location?.hash || location?.pathname.hash; if ( !isHash && + prevProps.location !== undefined && noInitialBlocksFocus && location?.pathname !== prevProps.location?.pathname ) {