Skip to content
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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bawjensen
Copy link

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

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mouse/pointer ignores coords.clientX changes
2 participants