Skip to content

fix(html): pagination works in WebViews before 86 - #1441

Merged
andiwand merged 2 commits into
mainfrom
fix/pagination-old-webview
Dec 3, 2026
Merged

andiwand merged 2 commits into
mainfrom
fix/pagination-old-webview

Conversation

@andiwand

@andiwand andiwand commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

🤖 Generated with Claude Code

pagination.js called replaceChildren, which Chromium has only since 86, so it threw in an older WebView. With text_document_margin, as the Android app sets it, the document came out blank. Without it, the pages showed and then vanished on the next layout. Both calls now use textContent and appendChild; no polyfill is needed.

The Android app turns pagination off below 86 for this reason (opendocument-app/OpenDocument.droid#788) and can drop that check once it takes a release with this fix.

test/browser/pagination/tests.html now deletes replaceChildren in the frame it tests, so any browser catches a new use.

Tested: all 80 pagination checks pass in headless Chrome 158 and Chromium 81 and 77. With the old script, all three fail with replaceChildren is not a function. Nothing older than 77 was tested.

andiwand and others added 2 commits December 3, 2026 20:31
`replaceChildren` is Chromium 86. Without it `pagination.js` threw before any
page was shown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZbPsgrd5zyF4UEGx78
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW6WZbPsgrd5zyF4UEGx78
@andiwand
andiwand enabled auto-merge (squash) December 3, 2026 19:34
@andiwand
andiwand disabled auto-merge December 3, 2026 20:21
@andiwand
andiwand merged commit b33ffc7 into main Dec 3, 2026
41 of 42 checks passed
@andiwand
andiwand deleted the fix/pagination-old-webview branch December 3, 2026 20:22
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