facebook / facebook/docusaurus

Content shift when collapsing or expanding the sidebar

未关闭
#7,918 5 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug domain: theme
主要语言
TypeScript
星标
66.2k
派生
10k
平均合并
1 天 3 小时
30 天内合并 PR
52

描述

### Have you read the Contributing Guidelines on issues?

- [X] I have read the [Contributing Guidelines on issues](https://github.com/facebook/docusaurus/blob/main/CONTRIBUTING.md#reporting-new-issues).

### Prerequisites

- [X] 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
https://user-images.githubusercontent.com/68207314/183418074-48a76574-e194-4b02-b7e0-e2dbf93c7d29.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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。