Skip to content

Footnotes (when navigating from Footnotes section) are covered by navbar #11232

@josh-wong

Description

@josh-wong

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

When a page has footnotes, if you click on a footnote in the Footnotes section of a page, it takes you to the part of the page where that footnote is location. However, the footnote is covered by the navbar when the navbar is static, which makes it difficult to see where the footnote is (requires scrolling up a little to see where the content being footnoted).

Reproducible demo

No response

Steps to reproduce

  1. Go to a page that has footnotes, and go to the Footnotes section that lists all footnotes on the page, which is typically at the bottom of the page.
  2. Click on the footnote that returns you to the content with the footnote earlier on the page.
  3. If the navbar is static, you will need to scroll up to see the footnote at the end of the text that includes the footnote.
  • If the navbar is not static (for example, if it disappears while you scroll), you can see the footnote without having to scroll up.

Expected behavior

The visitor should be able to see the footnote without having to scroll up after clicking the footnote link in the Footnotes section.

Actual behavior

When I click the link to go to the section where the footnote is being referenced, I can't see it until I scroll up, which is confusing.

Actual behavior when navbar is static (can see the footnote number)

docusaurus-footnote-issue-bad.MP4

Actual behavior when navbar is hidden (can see the footnote number)

docusaurus-footnote-issue-OK.MP4

Your environment

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 execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions