Fix annotation hover interaction when card has a target link#4274
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR fixes annotation hover/click interactions when annotations are rendered inside a clickable card (via a link overlay), by ensuring annotation triggers are stacked above the overlay.
Changes:
- Extend the
elevate-linkutility so annotation triggers are given a higher stacking context (z-index) alongside non-overlay links. - Add a
data-annotationmarker attribute to the annotation trigger element (<dfn>) for styling/targeting. - Update the E2E selector to use the new
data-annotationattribute.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/gitbook/src/components/RootLayout/globals.css | Elevates [data-annotation] elements above link overlays within LinkBox contexts. |
| packages/gitbook/src/components/DocumentView/Annotation/AnnotationPopover.tsx | Marks the annotation trigger with data-annotation so it can be elevated by CSS. |
| packages/gitbook/e2e/internal.spec.ts | Adjusts the annotations E2E test to target the new attribute. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
CleanShot.2026-05-27.at.09.51.11.mp4