-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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: Disabled elements being clickable #28807
fix: Disabled elements being clickable #28807
Conversation
If mouseUp element or mouseDown element or commonAncestor element is :disabled, click event should be prevented
tests that no click events are registered when click happens on child of disabled element
If mouseUp element or mouseDown element have an "actually disabled" parent, the click event should not be registered
|
@TheoAnastasiadis Thanks for the contribution. Please see this failing check for details about adding a changelog entry: https://github.com/cypress-io/cypress/actions/runs/7670111753/job/20905527788?pr=28807 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TheoAnastasiadis! Thank you for the contribution PR. I had some issues getting the added code in mouse.ts
to work correctly. Were you able to run the code changes against the cypress test or was this a best guess effort? Either way I think we can get this running with the suggestions below.
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
this was embarrassing 😳 is ok now, what should the release date of 13.6.5 be? |
@TheoAnastasiadis 2 weeks from the previous release is the target, so 2/13/2024 |
no worries @TheoAnastasiadis! We've all been there before 🙂 . CI should be running against the PR now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the changelog edits I think we are good to go! Going to wait for CI test feedback then will re review
cli/CHANGELOG.md
Outdated
|
||
**Bugfixes:** | ||
|
||
Fixed an issue where `.click()` commands on children of disabled elements would still produce "click" events -- even without `{ force: true }`. Fixes [#28788](https://github.com/cypress-io/cypress/issues/28788). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed an issue where `.click()` commands on children of disabled elements would still produce "click" events -- even without `{ force: true }`. Fixes [#28788](https://github.com/cypress-io/cypress/issues/28788). | |
- Fixed an issue where `.click()` commands on children of disabled elements would still produce "click" events -- even without `{ force: true }`. Fixes [#28788](https://github.com/cypress-io/cypress/issues/28788). |
Co-authored-by: Bill Glesias <bglesias@gmail.com>
Co-authored-by: Bill Glesias <bglesias@gmail.com>
565:1 error Expected indentation of 8 spaces but found 10 indent 567:7 error Expected blank line before this statement padding-line-between-statements
567:1 error Trailing spaces not allowed no-trailing-spaces
Needs changelog updates before merge
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
Click commands on children of disabled elements still produce
click
events.For example the following;
Even though the
button
element is disabled.How has the user experience changed?
Little
PR Tasks
cypress-documentation
?type definitions
?