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

Touchable: right-click triggers onPress #719

Closed
MatthieuLemoine opened this issue Nov 22, 2017 · 2 comments
Closed

Touchable: right-click triggers onPress #719

MatthieuLemoine opened this issue Nov 22, 2017 · 2 comments

Comments

@MatthieuLemoine
Copy link

Do you want to request a feature or report a bug?

A bug.

What is the current behavior?

When I right-click on a Touchable, the onPress event is triggered.

Can be reproduced in the Storybook.

What is the expected behavior?

When right-clicking in a browser, it should only open the contextual menu but not trigger a click on the underlying view.

While trying to reproduce, I saw that this issue is not present on Twitter Lite. Either it doesn't use Touchable or there is a way to disable this behavior.

Environment (include versions). Did this work in previous versions?

  • OS: macOS
  • Device: Macbook Air
  • Browser: Firefox 57 & Chrome 62
  • React Native for Web (version): 0.1.10
  • React (version): 16.0.0
@vaukalak
Copy link
Contributor

vaukalak commented Dec 2, 2017

@necolas what is expected behavior here?

@necolas
Copy link
Owner

necolas commented Dec 2, 2017

As described in the OP

@necolas necolas added the bug label Dec 2, 2017
@necolas necolas changed the title Right-click on Touchable triggers onPress Touchable: right-click triggers onPress Dec 18, 2017
rxrossi added a commit to rxrossi/react-native-web that referenced this issue Feb 8, 2018
For components based on Touchable, in the conditions:
  - Secondary mouse click alone
  - Secondary mouse click while primary is active
  - Dragging secondary mouse click on touchable area
  - Dragging secondary mouse click from touchable area to outside
The following events are no longer triggered:
  - onPress
  - onLongPress
  - onPressIn
  - onPressOut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants