Fix the z-order of ink drawings relative to the other editors#21608
Open
mughalfrazk wants to merge 1 commit into
Open
Fix the z-order of ink drawings relative to the other editors#21608mughalfrazk wants to merge 1 commit into
mughalfrazk wants to merge 1 commit into
Conversation
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
had a problem deploying
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Failure
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
mughalfrazk
temporarily deployed
to
code-coverage
July 21, 2026 18:30 — with
GitHub Actions
Inactive
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21608 +/- ##
==========================================
- Coverage 89.84% 89.84% -0.01%
==========================================
Files 263 263
Lines 66772 66786 +14
==========================================
+ Hits 59993 60005 +12
- Misses 6779 6781 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
When an ink drawing and an image/stamp overlap, the editor always painted the image on top, whatever order they were created in. Saving and reopening the PDF showed the correct order, so the preview didn't match the final rendering.
The drawings are SVGs living in the canvas wrapper, whereas the other editors are divs living in the annotation editor layer. Both layers are siblings in the page and neither creates a stacking context, so their children compete directly, and the SVGs had no z-index at all.
The SVGs now carry the z-index of the editor they belong to, both when they're created and when it changes. The in-progress drawing uses the z-index its editor will be given once the drawing session ends, so that the stroke doesn't jump when the pointer is released.
Since the SVGs are now stacked with the editors, they're also hit-tested before the annotation editor layer, so they must not swallow the pointer events used to draw: they're purely visual, the editor div being what handles the interactions.
Fixes #21401.