GitbookIO / GitbookIO/gitbook

Right navigation last link not highlighting when clicked

Open
#3,895 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
TypeScript
Stars
29k
Forks
4k
Avg merge
1d 2h
Merged PRs (30d)
71

Description

Bug description

When clicking the last link in a right-nav list, the link does not highlight after clicking and jumping to the anchor on the page. In the attach image, I had just clicked the "Key Features" link but it did not highlight though it did jump to the "Key Features" header on the page.

Image

How to reproduce

  1. Create page with several headings and paragraphs
  2. Make the last block less than a page of content or some amount that doesn't scroll the page
  3. Click on the right nav link

Additional context

This happens when the content is not large enough to scroll the page. I can add spaces below to force it to highlight but that feels messy and inconsistent between browsers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the right-navigation anchor behavior with several headings and a final block too short to scroll the page. Done means the last link highlights after clicking and jumping to its heading without adding extra spacing, consistently with the other links.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.