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(click): default force to .5 on mousePressed events #582

Conversation

alirezamirian
Copy link
Contributor

in Chrome and Firefox, a real mouse press leads to pointerdown event with pressure set to 0.5. Setting force to 0.5 matches that.

Closes #576

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
Copy link

what-the-diff bot commented Nov 2, 2023

PR Summary

  • Enhancement in realMouseDownOptions and RealClickOptions Interfaces
    The realMouseDownOptions and RealClickOptions interfaces have been updated with an optional pressure parameter, increasing flexibility.
  • Added 'force' property to realMouseDown and realClick functions
    Both the realMouseDown and realClick functions now contain a force property. Its value is derived from the pressure parameter, and defaults to 0.5 if not specifically provided. This allows users to control click pressure, enhancing the level of interaction manipulation within the system.

@dmtrKovalenko dmtrKovalenko self-requested a review November 2, 2023 19:10
@dmtrKovalenko dmtrKovalenko merged commit ef93985 into dmtrKovalenko:develop Nov 2, 2023
4 checks passed
@dmtrKovalenko
Copy link
Owner

🎉 This PR is included 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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discrepancy in the properties of pointerdown event triggered by realClick
2 participants