Skip to content

Conversation

@necolas
Copy link
Contributor

@necolas necolas commented Jul 10, 2019

  1. Allow auxillary button clicks (i.e., middle mouse button) to trigger 'onPressStart' and 'onPressEnd', but never 'onPress'.
  2. Report the button type – 'primary' or 'auxillary' – on the press event.

1. Allow auxillary button clicks (i.e., middle mouse button) to trigger 'onPressStart' and 'onPressEnd', but never 'onPress'.
2. Report the button type – 'primary' or 'auxillary' – on the press event.
@necolas necolas force-pushed the react-events/press-button-type branch from 9e57047 to 0d7e972 Compare July 10, 2019 16:02
Copy link
Contributor

@trueadm trueadm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added nit. Looks good :)

if (state.isPressWithinResponderRegion) {
if (
state.isPressWithinResponderRegion &&
nativeEvent.button !== 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we hoist button out and re-use it for both conditions?

@sizebot
Copy link

sizebot commented Jul 10, 2019

No significant bundle size changes to report.

Generated by 🚫 dangerJS

@necolas necolas merged commit 2073a71 into facebook:master Jul 10, 2019
@necolas necolas deleted the react-events/press-button-type branch December 20, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants