From 00beee97d13972d8cdc3c45c262f06a9e1c9f9da Mon Sep 17 00:00:00 2001 From: Alexejhero <32238504+Alexejhero@users.noreply.github.com> Date: Mon, 10 Jun 2024 22:17:24 +0200 Subject: [PATCH] try --- frontend/www/src/modules/modal.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/frontend/www/src/modules/modal.ts b/frontend/www/src/modules/modal.ts index de0ea9e..ff6abc2 100644 --- a/frontend/www/src/modules/modal.ts +++ b/frontend/www/src/modules/modal.ts @@ -3,10 +3,17 @@ import { ebsFetch } from "../util/ebs"; import { getConfig } from "../util/config"; import { logToDiscord } from "../util/logger"; -// get body element -const body = document.body; -// stop double click events -body.addEventListener("dblclick", (e) => { +document.body.addEventListener("click", (e) => { + e.stopPropagation(); + e.preventDefault(); +}); + +document.body.addEventListener("dblclick", (e) => { + e.stopPropagation(); + e.preventDefault(); +}); + +document.addEventListener("auxclick", (e) => { e.stopPropagation(); e.preventDefault(); });