From d9eeec6a6c46db38c8243760789fe56d6f198b27 Mon Sep 17 00:00:00 2001 From: Remy Raes Date: Fri, 2 Dec 2022 01:28:06 +0100 Subject: build: disable context menu in release builds --- src-vue/src/plugins/store.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src-vue') diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index 3d55d2a4..b51f97e5 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -290,6 +290,9 @@ async function _initializeApp(state: any) { if (menu_bar_handle !== null) { menu_bar_handle.classList.toggle('developer_build'); } + } else { + // Disable context menu in release build. + document.addEventListener('contextmenu', event => event.preventDefault()); } // Grab Northstar release canal value from store if exists -- cgit v1.2.3