hypothesis / hypothesis/client

Adder not fully visible due to z-index miscalculation

Open
#6,431 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Mustache
Stars
730
Forks
224
PR merge metrics
No merged PRs in 30d

Description

Originally reported [in Slack](https://hypothes-is.slack.com/archives/C2BLQDKHA/p1719523184567609)

**Steps to reproduce:**

1. Go to https://immer.app/en/social-reading/
2. Activate the client
3. Select text

**Result:**

The adder appears but is not fully visible and does nothing when clicked:

Adder partially visible

**Notes:**

The `` element is given a z-index of 1. The document's main `` however has a z-index of 2, so it gets rendered above the adder. Manually increasing the z-index of the `` makes it fully visible and interactive.

We have logic (`Adder._findZIndex`) to find the z-index of the content underneath the adder and choose a higher value. However it looks like it fails to take into account the z-index of ancestor elements of the points used to compute the index.

Related issues: https://github.com/hypothesis/client/issues/5622

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.