Adder not fully visible due to z-index miscalculation

オープン
#6,431 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
frontend

調査の方向性

まず https://immer.app/en/social-reading/ で問題を再現し、Adder._findZIndex のロジックを調べます。祖先要素の z-index 値が計算に使用されるポイントにどのような影響を与えるかを確認します。ページ上でテキストを選択したときに adder が完全に表示され、操作可能であれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Originally reported in Slack

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 <hypothesis-adder> element is given a z-index of 1. The document's main <article> however has a z-index of 2, so it gets rendered above the adder. Manually increasing the z-index of the <hypothesis-adder> 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

主要言語
Mustache
スター
743
フォーク
227
平均マージ
6分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

hypothesis/client のほかの issue

hypothesis/client の issue をすべて見る

似ている issue

Web Dev の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。