Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/app/core-concepts/interacting-with-elements.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ Keep up-to-date with the progress of this experiment in the [Cypress repository]

Experimental fast visibility is an experimental feature that is still under development. It uses different semantics from the legacy visibility algorithm, and does not yet fully support all testing scenarios.

- Shadow DOM is not yet supported. Tests that interact with Shadow DOM elements may fail or behave incorrectly.
- Shadow DOM is supported, but a few edge cases still diverge from the legacy algorithm because the fast algorithm relies on `elementFromPoint`:
- Subjects whose only visible region is a corner uncovered by a narrower covering element may be reported visible (the fast algorithm samples four corners and the center; the legacy algorithm only samples the center).
- Subjects whose `pointer-events` resolve to `none` are skipped by `elementFromPoint`, so the fast algorithm cannot find them at any sample point. Set `pointer-events: auto` on the subject if you need to assert visibility while keeping pointer-events disabled elsewhere.
- When a clipping ancestor (`overflow: hidden`, `clip`, `scroll`, or `auto`) sits between the subject and the subject's containing block, the fast algorithm treats the ancestor as clipping, while the legacy algorithm uses `offsetParent` rules to ignore it.

#### Common Compatibility Issues

Expand All @@ -102,7 +105,7 @@ Elements that are simply below the fold are automatically scrolled into view per

Elements positioned outside the scrollable document bounds (e.g. `position: absolute; top: -100px`) cannot be scrolled into view and are correctly identified as hidden.

Subjects nested inside an ancestor with `overflow: hidden` or `overflow: clip` are not scrolled into view, since doing so would expose content the parent intentionally clipped (e.g. inputs in a transform-based carousel/slider). These subjects are reported as hidden when they fall outside the parent's clip bounds.
Subjects positioned outside the bounds of an ancestor with `overflow: hidden`, `clip`, `scroll`, or `auto` are not scrolled into view, since doing so would expose content the parent intentionally clipped (e.g. inputs in a transform-based carousel/slider). These subjects are reported as hidden. Subjects that are in-bounds of such an ancestor — they would be visible if the ancestor itself were on-screen — are scrolled into view normally. The check walks shadow root boundaries, so subjects in Shadow DOM are treated the same as light-DOM descendants.

**Covered Elements**

Expand Down
2 changes: 1 addition & 1 deletion docs/app/references/experiments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ Consider enabling `experimentalFastVisibility` if you:

The experimental fast visibility algorithm has slightly different semantics for what it considers visible, when compared with the legacy algorithm. Tests that rely on edge-case behavior of the legacy visibility algorithm may fail or behave incorrectly.

- Shadow DOM is not yet supported. Tests that interact with Shadow DOM elements may fail or behave incorrectly.
- Shadow DOM is supported, but a few edge cases still diverge from the legacy algorithm because the fast algorithm relies on `elementFromPoint`. See [Experimental Fast Visibility limitations](/app/core-concepts/interacting-with-elements#Limitations) in the Interacting with Elements guide for details.

:::

Expand Down
Loading