Reputation: 13
I'm currently playing with the context menu API for extension in Chrome. I added some items in the context menu and I receive well the "onclick" event on my menu items.
But there seems to be no difference between a left click and a right click, and no event is triggered with middle click.
So the question is: Is there a way to know which button was used to select an item?
If no, I would like to suggest to add this feature to the API, but I don't know the proper way to do so.
Any help is welcome!
Upvotes: 1
Views: 167
Reputation: 115950
There is no way to know this with the current API. I suspect it is an application-level restriction, since none of Chrome's context options behave differently on right versus left click.
You can put in a feture request on the Chromium bug tracker. Make it very clear why you want this feature (i.e., describe your specific project), since at face value, it doesn't sound like something very many people would ever use; most people will probably settle for creating multiple context menu items to achieve multiple effects.
Upvotes: 1