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: hidden elements clickable #1172

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sethwbarton
Copy link

@sethwbarton sethwbarton commented Oct 6, 2023

What:

This PR fixes bug #1145 - "userEvent.click doesn't ignore hidden elements".
It also updates a dead link in CONTRIBUTING.md.

Why:

These changes are necessary to align the repo with the promise of the documentation and fix a bug.

How:

After replicating the bug, I wrote a test showing the undesired behavior. To make the test pass, I added a check in the "click" methods to see if the element was clickable via a CSS selector match.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged

This is my first Open Source contribution, and I'm frightfully aware that my contribution is likely naive or incomplete in some way. I'll take any suggestions gracefully.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 6, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2de0188:

Sandbox Source
userEvent-dom Configuration
userEvent-react Configuration

@sethwbarton sethwbarton changed the title Pr/fix hidden elements clickable fix: hidden elements clickable Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant