fix: auto-repair mis-rendered sidebar on introduction page - #757
Merged
Conversation
Mintlify sometimes mis-measures its fixed sidebar while hydrating /introduction (mode: frame) and sets a negative inline top, leaving the sidebar stuck under the header until the user scrolls. Detect that state (negative top while the footer is nowhere near the viewport - negative top is legitimate when clearing the footer) and reproduce the healing scroll: 1px down, restore next frame.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
CahidArda
marked this pull request as ready for review
July 16, 2026 11:08
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
CahidArda
added a commit
that referenced
this pull request
Jul 24, 2026
… race) (#764) The custom docs landing (mode: frame, introduced in e7e3bec / #748) renders its body client-side, so on a hard load the page is short and the footer sits inside the viewport. Mintlify's footer-avoidance scroll handler then pins the fixed sidebar above the viewport (negative inline top) and only recomputes on a scroll event - once the body hydrates and the footer moves away, nothing re-runs it and the sidebar stays stuck showing the tail of the nav. Replaces the scroll-nudge auto-repair (ba7a78b / #757), which repaired after the wrong paint (visible snap) and silently failed exactly when the bug is born: the pre-hydration page can be too short to scroll, so its 1px scroll fired no scroll event (and the resize event it also dispatched does not trigger Mintlify's handler at all). - style.css: reserve min-height:100vh on #content for /introduction from the first paint, so the footer can never be in view while the body is empty and the bad measurement becomes impossible. Keyed on data-page-href, which is SSR'd with the real path (data-current-path SSRs as "/" and is stamped only after hydration - too late). Second selector covers local mint dev, which stamps the attribute as /src/_props/introduction. - script.js: replace the nudge machinery with a small backstop that, if a stuck state ever appears (negative top with the footer far from view), re-runs Mintlify's own listener via a synthetic window scroll event - nothing visibly moves, and it works on an unscrollable page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mintlify sometimes mis-measures its fixed sidebar while hydrating /introduction (mode: frame) and sets a negative inline top, leaving the sidebar stuck under the header until the user scrolls. Detect that state (negative top while the footer is nowhere near the viewport - negative top is legitimate when clearing the footer) and reproduce the healing scroll: 1px down, restore next frame.