Skip to content

fix(library): PageUp/PageDown in note editor no longer scrolls the block off screen - #51

Merged
Atreus-X merged 1 commit into
mainfrom
fix/notes-pagekeys-scroll
Sep 30, 2026
Merged

Atreus-X merged 1 commit into
mainfrom
fix/notes-pagekeys-scroll

Conversation

@Atreus-X

Copy link
Copy Markdown
Owner

Summary

PageUp/PageDown in the notes editor could shift the whole block up until its top edge was off screen. When the textarea can't scroll further, the browser chains the page key to the nearest scrollable ancestor, and an overflow:hidden ancestor (the block) still scrolls programmatically. The editor now records its ancestors' scroll positions on those keys and restores them if they move (for 250 ms after the key).

Status

Cause inferred from the symptom and the layout; not reproduced without the running app.

Routes

Purely a local UI fix in the editor; identical on plain-SSH and wsh hosts (host notes and general notes share the editor).

Test plan

  • Notes editor with a long note: PageDown/PageUp scrolls the text, the block's top edge stays put
  • PageDown at the end of the note and PageUp at the start: block does not move
  • Short note (no textarea scrolling): same
  • Host Inspector note card (compact editor): same
  • Mouse wheel and scrollbars still work everywhere

npx vitest run passes; prettier clean; tsc unchanged (16 pre-existing errors).

🤖 Generated with Claude Code

https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6

…the block off screen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6QMXXvRReaKxWk1JL5Et6
@Atreus-X Atreus-X mentioned this pull request Sep 30, 2026
@Atreus-X
Atreus-X merged commit c0edf5a into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant