fix: let a tap reach the text on a paged document - #693
Merged
Conversation
andiwand
force-pushed
the
feature/search-every-view
branch
from
August 16, 2026 07:41
d7397cf to
0f1b1ee
Compare
andiwand
force-pushed
the
fix/page-hit-testing
branch
from
August 16, 2026 07:43
a0d86b2 to
be0e6e4
Compare
`.odr-page-outer` was `z-index:-1000`, which paints the page and everything in it behind its parent's in-flow content. It looks right, because the backdrop is the propagated canvas background rather than a box over it, but hit testing walks paint order: every tap landed on `.odr-pages`, so no caret appeared and ios never unfolded the keyboard. What the rule was for is the stacking context, which scopes the `z-index:-1` background of a shape to its page; the negative value itself was not. It is now `isolation:isolate`. Rendering is unchanged - both corpora compare identical under `compare-html`. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_0192ViykqXESAC9VM8Pv2R3u
andiwand
force-pushed
the
fix/page-hit-testing
branch
from
August 16, 2026 07:57
be0e6e4 to
76880c0
Compare
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
Stacked on #692 — both touch
document.cssand its reference copy. Base it onmain once that merges.
.odr-page-outercarriedz-index:-1000, which paints the page and its wholesubtree behind its parent's in-flow content. It still looks right, because the
backdrop is the propagated canvas background rather than a box covering it —
but hit testing walks paint order backwards, so every tap on a document landed
on
.odr-pagesand never reached the text. No caret, and on ios no keyboard.Android papered over the same rule by force-showing the soft keyboard when edit
mode starts.
What the rule was actually for is the stacking context: a shape's
background is a
z-index:-1child (translate_rect/translate_circle/translate_line), which needs the page to be one or it escapes to the rootcontext and paints behind the canvas. A negative
z-indexmakes a stackingcontext, so it worked — but any of them does, and this one also takes the page
out of reach.
isolation:isolateis the same context without the paint-ordermove.
It came in with #648, ported verbatim from OpenDocument.js (
9a7f522 "page zindex", May 2025), where it had no stated reason either.Verification
elementFromPointover a run:DIV.odr-pagesbefore,X-Safter — samepage, only the rule flipped.
odr_testrun per side, every html file byte-identical and onlyresources/document.cssdiffering, thencompare-html --driver chromeoverboth — 334 public and 1225 private files all match.
output/only, so this needs no reference update;the pins move anyway to keep
resources/in the reference tree honest.