Skip to content

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

Merged
ph-fritsche merged 1 commit intotesting-library:mainfrom
bawjensen:fix-isDifferentPointerPosition-client-coords
Jan 15, 2025
Merged

fix(pointer): make sure to check all fields of coords in isDifferentPointerPosition()#1229
ph-fritsche merged 1 commit intotesting-library:mainfrom
bawjensen:fix-isDifferentPointerPosition-client-coords

Conversation

@bawjensen
Copy link
Copy Markdown
Contributor

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
  • Tests
  • Ready to be merged

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Jul 10, 2024

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.

@ph-fritsche ph-fritsche force-pushed the fix-isDifferentPointerPosition-client-coords branch from dc5ffa3 to 0f4ff2c Compare January 15, 2025 19:06
@ph-fritsche ph-fritsche merged commit 5f3d28f into testing-library:main Jan 15, 2025
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 14.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mouse/pointer ignores coords.clientX changes

3 participants