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(pointer): do not throw for pointer-events: none on previous target #991

Merged
merged 2 commits into from Jul 18, 2022

Conversation

ph-fritsche
Copy link
Member

What:

Silently discard pointer events for a previous pointer target that has or inherits pointer-events: none instead of throwing an error.

Why:

Closes #922

How:

Just skip the calls if the element should not receive pointer events.
Add assertPointerEvents in unhover so that it still throws for .unhover(elementWithoutPointerEvents).

Checklist:

  • Tests
  • Ready to be merged

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 18, 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 fb60cfc:

Sandbox Source
userEvent-dom Configuration
userEvent-react Configuration
fast-water-tkttsi Issue #922

@codecov
Copy link

codecov bot commented Jul 18, 2022

Codecov Report

Merging #991 (5ea48f5) into main (77a7fa8) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 5ea48f5 differs from pull request most recent head fb60cfc. Consider uploading reports for the commit fb60cfc to get more accurate results

@@            Coverage Diff            @@
##              main      #991   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           86        86           
  Lines         1837      1843    +6     
  Branches       678       681    +3     
=========================================
+ Hits          1837      1843    +6     
Impacted Files Coverage Δ
src/convenience/hover.ts 100.00% <100.00%> (ø)
src/pointer/pointerMove.ts 100.00% <100.00%> (ø)
src/utility/selectOptions.ts 100.00% <100.00%> (ø)
src/utils/pointer/cssPointerEvents.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 9816d38...fb60cfc. Read the comment docs.

@ph-fritsche ph-fritsche merged commit 6e4058b into main Jul 18, 2022
@ph-fritsche ph-fritsche deleted the iss-922 branch July 18, 2022 12:09
@github-actions
Copy link

🎉 This PR is included in version 14.2.6 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pointer Events check sometimes returns false positives
1 participant