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

open contextmenu using PC keyboard's menu button #74

Open
yeban opened this issue Dec 27, 2014 · 2 comments
Open

open contextmenu using PC keyboard's menu button #74

yeban opened this issue Dec 27, 2014 · 2 comments

Comments

@yeban
Copy link

yeban commented Dec 27, 2014

Menu key - http://en.wikipedia.org/wiki/Menu_key.

Tested this on an Ubuntu machine. The element which triggers contextmenu on right click was selected / focussed. Then pressed the menu button. Browser's contextmenu opens, not bootstrap-contextmenu.

I digged in a bit more and 'contextmenu' event is tiggered on pressing menu key. So it would seem bootstrap-contextmenu is somehow missing that event? If no, I would appreciate any advice with regards to what could be wrong / how can I debug this in my setup.

@sydcanem
Copy link
Owner

I currently don't have access to such key. I believe when the context menu is triggered by a keyboard input, the event is usually triggered on document element. Can you set the document as the context and check if the plugin context menu opens?

@yeban
Copy link
Author

yeban commented Dec 31, 2014

So I did $(document).contextmenu({target: '#contextmenu'}). I believe that's what you meant by setting document as the context. It works - pressing menu key opens bootstrap-contextmenu. But now right clicking anywhere in the document opens bootstrap-context menu. I want to open bootstrap-contextmenu only when clicking on particular elements. How do I do that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants