Update: 在线版阻止浏览器默认右键菜单
This commit is contained in:
@@ -82,6 +82,7 @@ class App extends Component {
|
||||
constructor(element) {
|
||||
super();
|
||||
const $content = $(HTMLTemplate.get('html/app.html').render());
|
||||
$content.on('contextmenu', (e) => e.preventDefault());
|
||||
this.setContent($content);
|
||||
this.mountOn($(element));
|
||||
this.#nav_ = new Nav();
|
||||
|
||||
@@ -33,6 +33,7 @@ const { PythonShell } = Electron;
|
||||
|
||||
Loader.init = () => {
|
||||
$('body').append(XML.TEMPLATE_STR['INTERFACE']);
|
||||
$('body').on('contextmenu', (e) => e.preventDefault());
|
||||
if (goog.isElectron) {
|
||||
PythonShell.init();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user