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: check for inherited :disabled #872

Merged
merged 2 commits into from
Mar 4, 2022
Merged

fix: check for inherited :disabled #872

merged 2 commits into from
Mar 4, 2022

Conversation

ph-fritsche
Copy link
Member

What:

Check if an element is disabled according to specs.

Why:

Closes #844

How:

Traverse the element and ancestors and check if any of them cause the element being disabled.

:disabled pseudo-class should yield the correct value but doesn't in JSDOM.

Checklist:

  • Tests
  • Ready to be merged

@ph-fritsche ph-fritsche added this to the userEvent v14 milestone Mar 4, 2022
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 4, 2022

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 e8b6a0e:

Sandbox Source
userEvent-template Configuration
zen-goldstine-kj20nk Issue #844

@codecov
Copy link

codecov bot commented Mar 4, 2022

Codecov Report

Merging #872 (e8b6a0e) into beta (75fdd44) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              beta      #872   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           84        84           
  Lines         1725      1739   +14     
  Branches       619       628    +9     
=========================================
+ Hits          1725      1739   +14     
Impacted Files Coverage Δ
src/utils/misc/isDisabled.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75fdd44...e8b6a0e. Read the comment docs.

@ph-fritsche
Copy link
Member Author

@ph-fritsche ph-fritsche merged commit 1a00fdf into beta Mar 4, 2022
@ph-fritsche ph-fritsche deleted the fix-844 branch March 4, 2022 10:58
@github-actions
Copy link

github-actions bot commented Mar 4, 2022

🎉 This PR is included in version 14.0.0-beta.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Events ignore disabled property in fieldset
1 participant