Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
550 views
in Technique[技术] by (71.8m points)

javascript - Preventing opera mouse gestures

Is it possible to prevent opera mouse gestures for right button? I have web app on html5 and I decided to use right mouse button. But it doesnt work in opera, because opera has mouse gestures.

event.preventDefault(); // it doesn't work

May be anybody knows?

Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It doesn't actually have anything to do with gestures specifically. Opera doesn't allow scripts to detect context menu events by default so you'd have to ask users to change their site preferences for your site to allow scripts to detect context menu events.

Right click -> Edit Site Preferences -> Scripting (tab) -> Allow scripts to detect context menu events


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...