user-event icon indicating copy to clipboard operation
user-event copied to clipboard

fix(pointer): make sure to check all fields of `coords` in `isDifferentPointerPosition()`

Open bawjensen opened this issue 1 year ago • 1 comments

What:

Fixing a bug I observed where I tried to simulate click-and-drag, and the second event didn't fire because the logic thought the two positions were equal.

Why:

Fixes #1139.

How:

Checked https://github.com/bawjensen/user-event/blob/d0362796a33c2d39713998f82ae309020c37b385/src/event/types.ts#L27-L38, and used all those fields in comparison rather than simply x and y.

Checklist:

  • N/A Documentation
  • [x] Tests
  • [x] Ready to be merged

bawjensen avatar Jul 10 '24 19:07 bawjensen

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.

codesandbox-ci[bot] avatar Jul 10 '24 19:07 codesandbox-ci[bot]

:tada: This PR is included in version 14.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jan 15 '25 19:01 github-actions[bot]