joplock/scripts
igor d5d0a8f132 fix(mobile): keep the header and toolbar on screen while the iOS keyboard is up
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.
2026-10-13 14:18:42 +13:00
..
build-reference-docx.sh Add single-file HTML export, image/link inlining for exports, and visible table gridlines for PDF/DOCX 2026-07-15 14:34:11 +12:00
diag-reports.js fix(mobile): keep the header and toolbar on screen while the iOS keyboard is up 2026-10-13 14:18:42 +13:00
generatePwaAssets.mjs fix(ios): stop using black-translucent so the home-screen app reaches the bottom edge 2026-10-13 13:33:20 +13:00
rebuild-dev.sh fix(mobile): keep the header and toolbar on screen while the iOS keyboard is up 2026-10-13 14:18:42 +13:00
setup-joplin-cli.sh fix(joplin): stop Joplock destroying Joplin fields; guard encrypted/HTML/conflict items 2026-10-09 14:17:56 +13:00