Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: visibility issue when parent element is clipping #30934

Merged
merged 11 commits into from
Jan 27, 2025

Conversation

mschile
Copy link
Contributor

@mschile mschile commented Jan 23, 2025

Additional details

  • Fixed visibility issue where an element would return visible when its offset parent was within the clipping element.
  • Fixed issue where the visibility of option elements was not calculated correctly if the an ancestor had an overflow that clipped. The option elements were partially handled in isStrictlyHidden but were not being accounted for in isHiddenByAncestors.
  • Fixed visibility issue where we were not accounting for the scenario where either overflow-x or overflow-y was visible and the other one was clipping.

Steps to test

See new tests

How has the user experience changed?

Before:
Screenshot 2025-01-23 at 2 31 29 PM

After:
Screenshot 2025-01-23 at 2 29 39 PM

Before:
Screenshot 2025-01-23 at 2 45 54 PM

After:
Screenshot 2025-01-23 at 2 44 53 PM

Before:
Screenshot 2025-01-24 at 1 11 19 PM

After:
Screenshot 2025-01-24 at 1 10 34 PM

PR Tasks

Copy link

cypress bot commented Jan 23, 2025

cypress    Run #60065

Run Properties:  status check passed Passed #60065  •  git commit 6146fc00fe: Merge branch 'develop' into mschile/issue-30922
Project cypress
Branch Review mschile/issue-30922
Run status status check passed Passed #60065
Run duration 15m 30s
Commit git commit 6146fc00fe: Merge branch 'develop' into mschile/issue-30922
Committer Matt Schile
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 28
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 762
View all changes introduced in this branch ↗︎
UI Coverage  64.37%
  Untested elements 29  
  Tested elements 56  
Accessibility  96.19%
  Failed rules  0 critical   4 serious   1 moderate   0 minor
  Failed elements 196  

@jennifer-shehane jennifer-shehane self-requested a review January 27, 2025 14:56
Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the tested scenarios. Many of them were failing in 14.0.0 and now passing. Some are just expanding on the circumstances we're testing which is great. Small comment around the changelog.

cli/CHANGELOG.md Outdated Show resolved Hide resolved
packages/driver/src/dom/visibility.ts Show resolved Hide resolved
@mschile mschile merged commit 0811921 into develop Jan 27, 2025
113 of 124 checks passed
@mschile mschile deleted the mschile/issue-30922 branch January 27, 2025 17:32
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 28, 2025

Released in 14.0.1.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v14.0.1, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

14.0.0: Element being incorrectly seen as visible when it is not visible
3 participants