I’m using a context-menu jQuery plugin and I need to detect what browsers support this. How can this be done?
I heard some versions of Opera and Safari don’t support this right-click overriding business.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can create and fire a contextmenu event manually. If you set the proper handler, you can detect if the handler is called or not.
Here is an example (using jQuery for event creation and observation):
Here is a test page : http://jsfiddle.net/Hk4xA/6/
edit2: the DOM has striken again. I forgot that
createEventtotally doesn’t work on IE. So instead I used jQuery for the event creation too.