Redocly / Redocly/redoc

Redoc sidemenu doesn't auto-activate for certain styled outer container

Open
#1,987 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

If we put the ReDoc in an outer container with the following css style, the sidemenu doesn't automatically activate/expand anymore when scrolling:

<div style="position: absolute; top: 100px;left: 0; right: 0; bottom: 0; overflow-y: auto;"> 
    <div id="redoc-container" ></div>
</div>

Also, the URL history stopped updating when scrolling.

It stops working when the overflow-y: auto/scroll; and position: absolute show up in the outer container at the same time.

Expected behavior

The side menu should automatically activate/expand and history should be auto-updated when scrolling, even if the outer container is absolute and scroll overflow.

Screenshots

image

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

Reproduce the issue with the absolute, overflow-y:auto outer container shown in the report and a ReDoc instance. Trace the scroll handling used for sidemenu activation and URL history updates; done means both continue working while scrolling inside that container.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.