Skip to content

0.10.1: pin mobile writing stage to visual viewport - #12

Open
Digidai wants to merge 1 commit into
mainfrom
cursor/pin-stage-visual-viewport-9a60
Open

0.10.1: pin mobile writing stage to visual viewport#12
Digidai wants to merge 1 commit into
mainfrom
cursor/pin-stage-visual-viewport-9a60

Conversation

@Digidai

@Digidai Digidai commented Aug 17, 2026

Copy link
Copy Markdown
Owner

Summary

Tighten Writer 0.10.0’s locked mobile writing stage. The model stays the same; this fixes the iPhone Safari slide.

  • Pin only html.editor-stage to the visual viewport: top: var(--app-offset-top) + height: var(--app-height). Do not use inset: 0 / bottom: 0 (that boxed the layout viewport and left a chrome band the paper could slide through).
  • syncViewportMetrics now writes both --app-height = round(vv.height) and --app-offset-top = round(vv.offsetTop) (0 if no visualViewport).
  • Body is no longer a second position: fixed root (height: 100%; overflow: hidden). .desk stays absolute; inset: 0 inside the stage.
  • Stage / desk / sheet: touch-action: none. Only .input is pan-y + overscroll-behavior: contain. Document touchmove is cancelled unless the target is the textarea, a button, or a link.
  • Inline boot in public/index.html sets the viewport CSS vars before style.css paints.
  • Mobile hint is overlaid at the bottom of .desk (position: absolute; bottom: 8px) so it no longer steals paper height. Completion bar stays in-flow and only when visible ([hidden]).
  • Slightly more generous .well margin inset. Desktop A4 1123px, archive/settings/reader scrolling, and completion/hint copy rules are unchanged.

Version 0.10.1 (package.json, lockfile, src/version.js, changelog, ?v=0.10.1 cache-bust).

Testing

  • node --test test/mobile-editor-ui.test.js
  • npm test
  • npm run check

Do not merge or deploy from this PR.

Open in Web Open in Cursor 

Stop iPhone Safari from sliding the paper: lock only html.editor-stage
with top/height from visualViewport (no inset:0), write --app-offset-top,
overlay the hint, and keep pan-y on the textarea alone.

Co-authored-by: Gene Dai <Digidai@users.noreply.github.com>
@Digidai
Digidai marked this pull request as ready for review August 17, 2026 13:04
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

cursor Bot pushed a commit that referenced this pull request Aug 17, 2026
Co-authored-by: Gene Dai <Digidai@users.noreply.github.com>
@cursor
cursor Bot deleted the cursor/pin-stage-visual-viewport-9a60 branch August 17, 2026 13:05
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.

2 participants