-
Notifications
You must be signed in to change notification settings - Fork 249
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
Pointer Events check sometimes returns false positives #922
Comments
Thanks for the report. ❤️ Looks like this is not a false-positive for the other element. The implicit movement of the cursor out of the previously hovered element (that now has I think first of all we should improve the error message and report the Then we should probably not throw an error but just skip the events if the |
For other users hitting this issue, I've worked around it by updating my config to ignore the hover events const user = userEvent.setup({ skipHover: true }); |
My |
🎉 This issue has been resolved in version 14.2.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@all-contributors add @MattyBalaam bug |
I've put up a pull request to add @MattyBalaam! 🎉 |
I changed my approached based on @ph-fritsche first comment works for me. |
@rotimidokun please share your code or test case snippet. |
@EEBK99 i don't remember where i wrote that code, but it looks something like this
Instead of I used |
This is not a good replacement for |
okay, thanks. @ph-fritsche |
I still have the issue in 14.4.3 |
I also have this issue in 14.5.1. Unfortunately I do not have capacity to add a repro right now. |
I have the issue in 16.0.0 |
+1 |
Reproduction example
https://codesandbox.io/s/exciting-fire-b1ibfk?file=/src/App.test.js
Prerequisites
If you run a
userEvent.click
on an element which then haspointer-events: none
added after the interaction, then the nextuserEvent.click
on a different element thinks the element inheritspointer-events: none
Expected behavior
userEvent.click
should not throw a warning.Actual behavior
Error thrown “Unable to perform pointer interaction as the element has or inherits pointer-events set to "none".”
User-event version
14.0.4
Environment
See sandbox, which is using React 18. I also see the issue in React 17 locally.
Additional context
No response
The text was updated successfully, but these errors were encountered: