-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add button
number property to mouse events
#6410
Comments
Would be interested in your feedback on a WIP document that @kikisaints is working on related to mouse events. There's actually a comment open right now asking about what we want mouse events to look like. |
There's kind of a separate question of how we transition from one set of events/event props to another. Untyped usage makes deprecation particularly hairy. I think one of the ideas was a set of new pointer event handlers where we started with a min-set of supported properties, so we can build up a new event without breaking the old. |
Assigning to @kikisaints to reconcile with her in-flight doc of mouse API changes. |
tagging @stmoy since this needs PM input/design |
Not covered by PressEvent. I'm wondering how this will be reconciled with what React DOM does in this proposal: react-native-community/discussions-and-proposals#496 |
Proposal: Add
button
number property to mouse eventsSummary
React Native macOS provides the
button
property (0 for left, 2 for right) here, which comes from the DOM MouseEvent.button API.On React Native Windows, the mouse events have "non-standard" boolean properties (e.g.
isLeftButton
,isRightButton
, etc.) set here. This proposal is to addbutton
property and hopefully deprecate the others so that code built for both macOS and Windows doesn't need separate checks to detect right clicks for each platform.The text was updated successfully, but these errors were encountered: