Skip to content

fix: prevent header from scrolling away by constraining layout height#10

Merged
j4rviscmd merged 2 commits intomainfrom
fix/sticky-header
Mar 22, 2026
Merged

fix: prevent header from scrolling away by constraining layout height#10
j4rviscmd merged 2 commits intomainfrom
fix/sticky-header

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Fix header scrolling out of view by adding h-svh to SidebarProvider, establishing a proper height chain so SidebarInset becomes the scroll container
  • Move scroll responsibility from Editor to a wrapper div, and replace Editor's <main> with <div> to resolve semantic HTML nesting
  • Simplify note selection by consolidating localStorage sync into a single selectNote callback

Test plan

  • Verify header stays fixed while scrolling through a long note
  • Verify header remains visible with an empty/new note
  • Verify sidebar open/close doesn't affect header positioning
  • Verify dark mode header background renders correctly
  • Verify BlockNote toolbar and editor scrolling work without interference

🤖 Generated with Claude Code

j4rviscmd and others added 2 commits March 22, 2026 20:02
The SidebarProvider wrapper used `min-h-svh` which allowed it to grow
with content, preventing SidebarInset from becoming a scroll container.
This caused the header to scroll out of view.

- Add `h-svh` to SidebarProvider to fix the height chain
- Set SidebarInset to `overflow-hidden` and wrap Editor in a scrollable div
- Replace Editor's `<main>` with `<div>` to resolve semantic nesting
- Simplify note selection by consolidating localStorage sync into `selectNote`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@j4rviscmd j4rviscmd added the bug Something isn't working label Mar 22, 2026
@j4rviscmd j4rviscmd merged commit b0ccc93 into main Mar 22, 2026
@j4rviscmd j4rviscmd deleted the fix/sticky-header branch March 22, 2026 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant