-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
Discrepancy in the properties of pointerdown event triggered by realClick #576
Labels
Comments
Yes I think it’s reasonable to set the default to cypress and provide an option to override. Feel free to open a pr. I think that’s not even a breaking change |
alirezamirian
added a commit
to alirezamirian/cypress-real-events
that referenced
this issue
Nov 2, 2023
Real mouse press leads to pointerdown events with pressure set to 0.5, in Chrome and Firefox. Setting [force](https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchMouseEvent:~:text=clicked%20(default%3A%200).-,force,-number) to 0.5 matches that. Closes dmtrKovalenko#576
dmtrKovalenko
pushed a commit
that referenced
this issue
Nov 2, 2023
Real mouse press leads to pointerdown events with pressure set to 0.5, in Chrome and Firefox. Setting [force](https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchMouseEvent:~:text=clicked%20(default%3A%200).-,force,-number) to 0.5 matches that. Closes #576
🎉 This issue has been resolved in version 1.11.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
Pointerdown events triggered as a result of calling realClick, have
pressure
0, but in a real click,pressure
is .5 in Chrome and Firefox. That can make code that uses libraries which are sensitive to those properties behave differently when testing with cypress.Suggested solution
Add
force: 0.5
, to theInput.dispatchMouseEvent
cdp command params. it's supported and setspressure
in the triggered event. I can open a PR if I get the green light.If for some reason it's not acceptable to set force to 0.5 by default, an option would also make it possible to work around the issue.
The text was updated successfully, but these errors were encountered: