Skip to content

visible button in a sticky element in a modal is detected as not visible #14938

Closed
@FraKraBa

Description

@FraKraBa

Current behavior

I have a button inside a sticky element in a modal. Behind the modal is a scrollable element which is an ancestor of the modal. Cypress thinks that the button is not visible. I get the following error message:

This element <button#button> is not visible because its content is being clipped by one of its parent elements, which has a CSS property of overflow: hidden, scroll or auto

Here is the screenshot of the failing test:
page -- works (failed)

Desired behavior

I can see the button. Cypress should recognize that it is visible.

Test code to reproduce

I have a simple example which reproduces this error. You can find it here:
https://github.com/FraKraBa/cypress-test-tiny

Versions

Cypress 6.4.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions