Skip to content

Layout moves around when switching tabs (scroll position issue) #9858

Description

@Vic-Dev

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Same issue as before seems to have re-occurred in latest docusaurus. I copied the previous example and updated the docusaurus package, and the scroll is jumping around again.

Reproducible demo

https://stackblitz.com/edit/github-k5xct4-kjy427?file=package.json

Steps to reproduce

Same as the previous example:

  1. Go to the Blog in the Stackblitz preview pane to the right
  2. Scroll down to the MDX post, it has the tabs example
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionclosed: working as intendedThis issue is intended behavior, there's no need to take any action.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions