mirror of
https://github.com/abort-retry-ignore/joplock.git
synced 2026-10-21 14:19:30 +00:00
Highlighting a word low in a note scrolled the toolbar (and header) off the top: with the keyboard up, iOS scrolls the document itself to reveal the caret (scrollY 268-342px measured on an iPhone Air home-screen app, body already position:fixed). Chromium does not do this, so it needed a device-measured fix. public/viewport.js (shared by the app and /diag?shell=vv), on touch devices only: - detects a soft keyboard from visual-viewport occlusion against the largest unobstructed height, never from innerHeight - vv.height - while it is up, sets html[data-keyboard], --app-height and --app-top, which styles.css applies to .mobile-app only in that state - puts any document scroll back to (0,0) while the mobile shell shows - fires joplock:viewport; with the admin debug flag it posts viewport.kb reports (header/toolbar positions, pins) to the client log - localStorage joplock-viewport=off is a device kill switch positionTinyMCEHost anchors to the shell's bottom instead of its own innerHeight/visualViewport guess, and the dead keyboard-gone toolbar logic in onVpChange is gone. Also: scripts/diag-reports.js reads viewport.kb and the new .diag-archive/ (rebuild-dev.sh saves device reports before recreating the container, best effort). Unit tests use real iPhone readings; Playwright covers the keyboard state, the scroll pin and the kill switch. Full mobile and desktop suites pass. Bumps ASSET_VERSION and the service worker cache. |
||
|---|---|---|
| .. | ||
| build-reference-docx.sh | ||
| diag-reports.js | ||
| generatePwaAssets.mjs | ||
| rebuild-dev.sh | ||
| setup-joplin-cli.sh | ||