Skip to content

Content shift when collapsing or expanding the sidebar #7918

Description

@yzhe819

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

The displayed portion of the content changes visually when switching between the collapsed and expanded states of the sidebar. When I collapsed and then expanded sidebar at the bottom, the page display jumps from the bottom footer to the content section.

Reproducible demo

https://docusaurus.io/docs/deployment

Steps to reproduce

  1. Navigate to: https://docusaurus.io/docs/deployment
  2. Scroll to the bottom
  3. Collapse the sidebar
  4. Expand the sidebar
  5. Try 3 and 4 multiple times (You can notice the vertical shift of web page content)

Demo

video1197996455.mp4

Expected behavior

No content shift when collapsing or expanding the sidebar

Need more expected details from the development team
cc @Josh-Cena

Actual behavior

Before the sidebar is collapsed, the page is at the bottom, but after the sidebar is collapsed and expanded, the page will jump to the Deploying to Layer0 section.

Your environment

  • Public site URL: https://docusaurus.io/docs/deployment
  • Docusaurus version used: 2.0.0-rc.1
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Chrome
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows

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 executiondomain: themeRelated to the default theme components

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions