Skip to content

Commit

Permalink
update: skip scroll to top on inital SSR completion. (#6523)
Browse files Browse the repository at this point in the history
Signed-off-by: Faakhir30 <[email protected]>
  • Loading branch information
Faakhir30 authored Dec 10, 2024
1 parent 0987c96 commit 08893ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/volto/news/6523.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Disable initial scroll to top after SSR completion. @Faakhir30
1 change: 1 addition & 0 deletions packages/volto/src/helpers/ScrollToTop/ScrollToTop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {
Expand Down

0 comments on commit 08893ab

Please sign in to comment.