Have you read the Contributing Guidelines on issues?
Prerequisites
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.
|
export function useScrollPositionBlocker(): { |
Reproducible demo
https://stackblitz.com/edit/github-k5xct4?file=blog/2021-08-01-mdx-blog-post.mdx
Steps to reproduce
- 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
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clearoryarn clearcommand.rm -rf node_modules yarn.lock package-lock.jsonand 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