Skip to content

Commit

Permalink
Increase the z-index of hints by five to avoid some instance where th…
Browse files Browse the repository at this point in the history
…e hint are obscured (#170)
  • Loading branch information
david-tejada authored Aug 6, 2023
1 parent 1ffb508 commit d087442
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/content/hints/HintClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,12 @@ function calculateZIndex(target: Element, hintOuter: HTMLDivElement) {
current = current.parentElement;
}

// We increase by one to avoid relying on document order because this can be
// altered with the property `order` (only in Firefox).
return zIndex + 1;
// We increase the z-index to avoid relying on document order because this can
// be altered with the property `order` (only in Firefox). We increase it by 5
// to avoid some instances were the z-index is increased slightly after we
// have already made the calculations. For example in gmail (All mail) when we
// hover over a row.
return zIndex + 5;
}

// This mutation observer takes care of reattaching the hints when they are
Expand Down

0 comments on commit d087442

Please sign in to comment.