-
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
14.4: pointermove events no longer trigger #1047
Comments
Thanks for the report ❤️ There is a typo in the helper: user-event/src/system/pointer/shared.ts Lines 30 to 31 in 1aa2027
|
@ph-fritsche any plan to fix this ? |
I'm running into this bug as well. The |
I dug in to this today and realised while there is a bug in the isDifferentPointerPosition util that wasn't what was causing our tests to fail in versions >= 14.4.0. Our tests were all specified with clientX & clientY. Changing these to x and y respectively allows our tests to pass again. Breaks in >= 14.4.0: await user.pointer([
{
keys: '[MouseLeft>]',
target: el,
coords: { clientX: 100, clientY: 100 },
},
{
coords: { clientX: 200, clientY: 200 },
},
{
keys: '[/MouseLeft]',
},
]); Fixed in >= 14.4.0: await user.pointer([
{
keys: '[MouseLeft>]',
target: el,
coords: { x: 100, y: 100 },
},
{
coords: { x: 200, y: 200 },
},
{
keys: '[/MouseLeft]',
},
]); |
Reproduction example
https://codesandbox.io/s/userevent-touchmove-skz767?file=/src/App.test.js
Prerequisites
Expected behavior
The new coordinates from the second
pointermove
event should be logged. (125, 100)Actual behavior
The initial cordinate from the initial
pointerdown
event are logged. (100, 100)User-event version
14.4.0
Environment
Testing Library framework:
JS framework:
Test environment:
DOM implementation:
Additional context
Works just fine on version 14.3.0
The text was updated successfully, but these errors were encountered: