Keep the editor's section nav in view while scrolling

The nav was sticky inside a wrapper only as tall as itself, so it had
nowhere to travel and scrolled away. The grid cell now sticks instead,
and the mobile "Jump to" bar sits straight in the page for the same
reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-27 15:36:02 -05:00
parent 8186aff62f
commit 960c854611
2 changed files with 10 additions and 7 deletions

View file

@ -364,12 +364,14 @@ export default function EntityEdit() {
{isNew ? `New ${manifest.singular}` : heading}
</h1>
<div className="mt-4">
<SectionJump sections={sections} />
</div>
{/* Straight in the page, not wrapped: a sticky element only
travels within its parent, so its parent has to be tall. */}
<SectionJump sections={sections} />
<div className="lg:grid lg:grid-cols-[13rem_minmax(0,1fr)] lg:items-start lg:gap-10">
<div className="lg:pt-6">
{/* The grid cell is what sticks: it spans the grid, where the
nav inside it would only span itself and have nowhere to go. */}
<div className="lg:sticky lg:top-0 lg:pt-6">
<SectionNav sections={sections} />
</div>