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
Related: page/offsetX/Y are defined as properties of PointerCoords but cannot be set on MouseEvent. Depending on wether these props are supported or not, they should either be included in the pointer difference check or removed.
Reproduction example
https://codesandbox.io/s/adoring-browser-h5lzcy?file=/src/App.test.js
Prerequisites
coords: {clientX: 1}
coords: {clientX: 2}
Expected behavior
Two
mousemove
events with clientX values of 1 and 2.Actual behavior
A single event with clientX 1.
User-event version
14.4.3
Environment
No response
Additional context
Relevant
isDifferentPointerPosition
only comparesx
andy
.user-event/src/system/pointer/shared.ts
Lines 24 to 35 in 7a305de
initMouseEvent
usesx
/y
as defaults forclientX
/clientY
.user-event/src/event/createEvent.ts
Lines 180 to 205 in 7a305de
x & y are specified as aliases of clientX/Y, suggesting the defaults should go the other way around.
From JSDOM@22, x & y will alias clientX/Y per spec:
https://github.com/jsdom/jsdom/blob/a39e0ec4ce9a8806692d986a7ed0cd565ec7498a/lib/jsdom/living/events/MouseEvent-impl.js#L9-L15
Related: page/offsetX/Y are defined as properties of
PointerCoords
but cannot be set on MouseEvent. Depending on wether these props are supported or not, they should either be included in the pointer difference check or removed.Reported in: #1037
Workaround
Use
x
/y
for coords:The text was updated successfully, but these errors were encountered: