Skip to content

Commit

Permalink
Explicitly add z-index: 0 to .textLayer
Browse files Browse the repository at this point in the history
This creates a "stacking context", making sure that the elements
inside `.textLayer` (on the z axis) remain inside `.textLayer`.
Without this change, the `<span>`s inside `.textLayer` end up being
on top of `.annotationLayer`.

This was caught by the freetext editor integration tests, that
failed because we were trying to draw on top of some text.
  • Loading branch information
nicolo-ribaudo committed Apr 18, 2024
1 parent 0119250 commit de1e73b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions web/text_layer_builder.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
forced-color-adjust: none;
transform-origin: 0 0;
caret-color: CanvasText;
z-index: 0;

&.highlighting {
touch-action: none;
Expand Down

0 comments on commit de1e73b

Please sign in to comment.