From 8712bde92287cdc4e2cb0fd5dd9cea5cfa71f048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Thu, 12 Dec 2024 20:06:22 +0800 Subject: [PATCH] =?UTF-8?q?Update:=20=E5=9C=A8=E7=BA=BF=E7=89=88=E9=98=BB?= =?UTF-8?q?=E6=AD=A2=E6=B5=8F=E8=A7=88=E5=99=A8=E9=BB=98=E8=AE=A4=E5=8F=B3?= =?UTF-8?q?=E9=94=AE=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/modules/mixly-modules/common/app.js | 1 + mixly-sw/mixly-modules/common/loader.js | 1 + 2 files changed, 2 insertions(+) diff --git a/common/modules/mixly-modules/common/app.js b/common/modules/mixly-modules/common/app.js index 28c03304..0d10bfd1 100644 --- a/common/modules/mixly-modules/common/app.js +++ b/common/modules/mixly-modules/common/app.js @@ -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(); diff --git a/mixly-sw/mixly-modules/common/loader.js b/mixly-sw/mixly-modules/common/loader.js index 4c24ccdf..1666295d 100644 --- a/mixly-sw/mixly-modules/common/loader.js +++ b/mixly-sw/mixly-modules/common/loader.js @@ -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(); }