vkbansal/react-contextmenu

ctrl + click on google chrome doesn't work

razaffina opened this issue · 1 comments

Version

1.9.1

Test Case

https://jsfiddle.net/Luktwrdm/54/

Steps to reproduce

Open project in google chrom.
Ctrl click the trigger component

Expected Behavior

The Context menu opens

Actual Behavior

No Context menu open

Possible fix

In ContextMenuTrigger.js>handleContextClick. Remove if statement checking that event.button === this.props.mousebutton. Replace with this.props.mousebutton === 2. This should fix the problem because in chrome a ctrl click event.button is 0 not 2.