-
Notifications
You must be signed in to change notification settings - Fork 110
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
Right click firing tap event on windows #70
Comments
@gaearon Is this used internally at Facebook anymore? Is this issue something that is unlikely to be fixed given the current situation with tap delay on iOS Safari finally being addressed? |
I suppose the answer is not used:
|
@nathanmarks Was this ever used internally at Facebook? This is a community plugin derived from the original tap event plugin that is in the React source code. I'd be happy to merge a pull request for this. |
@madjam002 I was referring to the source doe this is derived from, but great point! Even if that's the case it doesn't hinge on the FB source being updated. I just remembered the last PR was from gaearon to add react 15 compatibility and made some assumption that they had updated the code in FB core too. I haven't looked into the cause yet -- any inkling? |
Okay sure 😄 This will be happening because we're not looking at the We could add something around here https://github.com/zilverline/react-tap-event-plugin/blob/master/src/TapEventPlugin.js#L138 to look at the native event button and reject the click if it's not a left mouse button press. But I'm not sure if this is even desired behaviour, I imagine most people would want this..? |
Thanks for the brief -- Admittedly I hadn't really looked closely at the source. 😄 Are you saying most people would want the right click to trigger? On OS X it only fires for the left click, this feels most natural as it makes In the example found in this repo, there is inconsistent behaviour across operating systems so whichever way around it is, I believe that it should be consistent. |
Yeah if it's only left click on Mac we should make it consistent with Windows too. |
@madjam002 cool -- i'll try find the time to have a quick fiddle |
+1 |
This issue caused an annoying bug in my app. In my app, pressing the right mouse button over certain elements opens a Material UI context menu, in which you are meant to left-click the menu item you want to activate. The bug is that releasing the right mouse button would trigger an This only happened if the cursor didn't move or moved only a little during the right-click. If you're wondering how a context menu item could be under the cursor without it moving, it happens when the cursor is near the edge of the window and the menu is shifted to stay onscreen. I worked around this in my app by changing the |
On windows the behaviour is not consistent with
onClick
. With a left click, both theonTouchTap
andonClick
fire, but with a right click theonTouchTap
fires. This issue is not present on OS X.Using the demo provided in this repo: (Tested on Windows 10 & Windows 8.1 in chrome & IE)
It is definitely a right click, and the
onClick
does not fire:The text was updated successfully, but these errors were encountered: