You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I debugged the code and found that the pointer event compared prevTarget and currTarget. When they are not equal, the mouseLeave event will be triggered, which will cause the child elements to be hidden and the target to be lost in subsequent events.
Maybe we can determine whether to trigger the mouseLeave event based on the node level, which will be closer to the browser's implementation.
The text was updated successfully, but these errors were encountered:
Reproduction example
https://codesandbox.io/p/devbox/react-jest-test-4yx2wr?file=/src/App.js
Prerequisites
Expected behavior
child element displayed and click event is triggered
Actual behavior
child element hidden, and click event is not triggered
User-event version
14.5.2
Environment
Testing Library framework:
@testing-library/react@14.1.2
JS framework:
react@18.0.2
Test environment:
DOM implementation:
Additional context
I debugged the code and found that the pointer event compared prevTarget and currTarget. When they are not equal, the mouseLeave event will be triggered, which will cause the child elements to be hidden and the target to be lost in subsequent events.
Maybe we can determine whether to trigger the mouseLeave event based on the node level, which will be closer to the browser's implementation.
The text was updated successfully, but these errors were encountered: