You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go to the Blog in the Stackblitz preview pane to the right
Scroll down to the MDX post, it has the tabs example
Switch tabs and see how scroll behaves. Try both the first and the second tab group
Expected behavior
Scroll position should be maintained when switching tabs
Actual behavior
Page layout jumps
Your environment
Public source code:
Public site URL:
Docusaurus version used:
Environment name and version (e.g. Chrome 89, Node.js 16.4):
Operating system and version (e.g. Ubuntu 20.04.2 LTS):
Self-service
I'd be willing to fix this bug myself.
The text was updated successfully, but these errors were encountered:
Tobbe
added
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
labels
Feb 3, 2023
Thanks for reporting, will be fixed in #8628 and included in 2.3.1 today
We restored the scroll position a bit too early before the other tabs had the opportunity to render. I fixed it by queuing the scroll restoration at the end of all the pending React re-renders
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
Tab groups that are linked causes the page to jump when switching tabs
See this Tape that I recorded
https://s.tape.sh/bjAyxKyo
Maybe this was introduce with this change: #8486
Something about
useScrollPositionBlocker()
that doesn't work properly anymore.docusaurus/packages/docusaurus-theme-common/src/utils/scrollUtils.tsx
Line 185 in 32384b7
Reproducible demo
https://stackblitz.com/edit/github-k5xct4?file=blog/2021-08-01-mdx-blog-post.mdx
Steps to reproduce
Expected behavior
Scroll position should be maintained when switching tabs
Actual behavior
Page layout jumps
Your environment
Self-service
The text was updated successfully, but these errors were encountered: