3

I am trying to allow my CMS users to click certain controls with ALT+CTRL both pressed, but this results in the context menu being shown, because CTRL+Leftclick simulates a Rightclick, at least here on Mac OSX (which is the primary OS of my client).

The question is: how can I stop the context menu from popping up but still make sure my click goes through to the element it is being triggered on?

I tried oncontextmenu="return false;" in my <body> for testing purposes. It would properly prevent the menu from popping up, but my click event would not go through.

6
  • pick a different shortcut would be my advice from a UX standpoint. Commented Nov 25, 2011 at 3:50
  • Good point, i have a hard time parting with the old habits, and so have my clients, but perhaps it is the only way? Anyone know if i can check for the FN key on a Mac? Commented Nov 25, 2011 at 15:38
  • Firefox has finally begun to add support for custom contextmenu items. That would be the ideal solution but there's practically no support for it as it is. Commented Nov 25, 2011 at 15:40
  • That sounds interesting. In fact in my situation that would be an option, as i decided to limit CMS usage to Firefox exclusively. Commented Nov 25, 2011 at 15:46
  • It's new in Firefox 8, and the bugs are still being worked on, but there's a nice demo at least. Commented Nov 25, 2011 at 15:49

1 Answer 1

1

As i was unable to properly solve this problem by fiddling around with the way the browser behaves in regard to the context menu, i went for a different approach and bound the META key instead of the CTRL key. Works well this way. I'll leave the q/a in for others.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.