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

Add button number property to mouse events #6410

Open
appden opened this issue Nov 3, 2020 · 5 comments
Open

Add button number property to mouse events #6410

appden opened this issue Nov 3, 2020 · 5 comments
Labels
Area: Mouse enhancement Needs: PM Design New feature or request Partner: Facebook Story: ⌨ Keyboard/Mouse Desktop APIs (not already provided by mobile-centric RN)
Milestone

Comments

@appden
Copy link
Collaborator

appden commented Nov 3, 2020

Proposal: Add button number property to mouse events

Summary

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 add button 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.

@ghost ghost added Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) Partner: Facebook labels Nov 3, 2020
@NickGerleman
Copy link
Collaborator

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.

@NickGerleman
Copy link
Collaborator

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.

@chrisglein chrisglein added Area: Mouse Needs: PM Design New feature or request and removed Needs: Triage 🔍 New issue that needs to be reviewed by the issue management team (label applied by bot) labels Nov 5, 2020
@chrisglein chrisglein added this to the 0.64 milestone Nov 5, 2020
@chrisglein
Copy link
Member

Assigning to @kikisaints to reconcile with her in-flight doc of mouse API changes.

@chrisglein chrisglein modified the milestones: 0.64, 0.65 Jan 7, 2021
@chrisglein chrisglein modified the milestones: 0.65, 0.66 Apr 24, 2021
@chrisglein chrisglein added the Story: ⌨ Keyboard/Mouse Desktop APIs (not already provided by mobile-centric RN) label Aug 9, 2021
@chrisglein chrisglein added this to Future in Deliverable Planning Aug 9, 2021
@chrisglein chrisglein modified the milestones: 0.66, 0.67 Aug 31, 2021
@asklar
Copy link
Member

asklar commented Oct 22, 2021

tagging @stmoy since this needs PM input/design

@asklar asklar modified the milestones: 0.67, 0.68 Oct 22, 2021
@chrisglein chrisglein assigned marlenecota and dedavis6797 and unassigned stmoy Jan 17, 2022
@chrisglein chrisglein modified the milestones: 0.68, Backlog Feb 24, 2022
@chrisglein
Copy link
Member

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

@jonthysell jonthysell added the Recommend: Backlog Recommend that issue should be given Backlog milestone. label Aug 29, 2023
@chiaramooney chiaramooney removed the Recommend: Backlog Recommend that issue should be given Backlog milestone. label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Mouse enhancement Needs: PM Design New feature or request Partner: Facebook Story: ⌨ Keyboard/Mouse Desktop APIs (not already provided by mobile-centric RN)
Projects
No open projects
Development

No branches or pull requests

10 participants