SteveSandersonMS / WebWindow

.NET Core library to open native OS windows containing web UI on Windows, Mac, and Linux. Experimental.
Apache License 2.0
1.99k stars 215 forks source link

How to disable right click??? #80

Closed eivarin closed 4 years ago

eivarin commented 4 years ago

So, I know webwindow runs on the webview2 API that comes with the new Edge Chromium.

Would there be a way to completely disable the browser right click that opens the browser options? It isn't really convenient for someone who is trying to make browser design look native

eivarin commented 4 years ago

So I found out that to do this u need to update the WebView2 to the new version (0.9.430) and update the methods name in c++ . Working on it at the moment.

jinqi166 commented 4 years ago

You need this code on js side window.οncοntextmenu=function(){return false;}

eivarin commented 4 years ago

thanks, it worked for me although i did it in a different way <body oncontextmenu="return false;"> anyway thanks @jinqi166