Repository navigation
fix(html): pagination works in WebViews before 86 - #1441
Merged
Merged
Conversation
`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
enabled auto-merge (squash)
December 3, 2026 19:34
andiwand
disabled auto-merge
December 3, 2026 20:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
pagination.jscalledreplaceChildren, which Chromium has only since 86, so it threw in an older WebView. Withtext_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 usetextContentandappendChild; 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.htmlnow deletesreplaceChildrenin 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.