Skip to content

width/height 0 and transform + overflow hidden #6093

@sainthkh

Description

@sainthkh

Current behavior:

When an element has width or height 0px with non-none transform and overflow hidden, it is not visible. But isHidden() cannot detect it.

<!-- Example -->
<div style="height: 0px; transform: translate(1, 2)"><p>Visible</p></div>
<div style="height: 0px; transform: translate(1, 2); overflow: hidden"><p>Invisible</p></div>

It is found with cypress-example-piechopper in https://circleci.com/gh/cypress-io/cypress-test-example-repos/71863.

Desired behavior:

isHidden() should detect it.

Steps to reproduce: (app code and test code)

  1. Download https://github.com/cypress-io/cypress-example-piechopper.
  2. Change cypress to dev version.
  3. Run app_spec.js
  4. "displays hamburger menu" fails.

Versions

After #6000 is merged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions