Redocly / Redocly/redoc

When opening an HTML file built with the Redocly command in a browser that contains an anchor, the sidebar does not expand and automatically positions to that anchor.

Open
#2,522 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
Dominant language
TypeScript
Stars
25.9k
Forks
2.4k
Avg merge
13h 10m
Merged PRs (30d)
4

Description

Describe the bug

When opening an HTML file url(built with the redocly build-docs command) with anchor in a browser, the sidebar does not expand and automatically positions to that anchor.

To Reproduce
Steps to reproduce the behavior:

Here's an example
https://github.com/Zacama/redoc-2522

Expected behavior

The sidebar expands and automatically positions to that anchor.

Logs

OpenAPI description

Redocly Version(s)

1.10.1

Node.js Version(s)

v20.11.1

Additional context

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 with the linked reproduction at https://github.com/Zacama/redoc-2522 and the HTML produced by the redocly build-docs command. Trace how an anchor URL is handled when the generated documentation opens, then verify that the sidebar expands and positions itself at the anchor.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.