Skip to content

Commit

Permalink
Stop propagation of double clicks
Browse files Browse the repository at this point in the history
  • Loading branch information
Vedal987 committed Jun 10, 2024
1 parent 53fb1c2 commit 0cb5d4c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions frontend/www/src/modules/modal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ 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) => {
e.stopPropagation();
e.preventDefault();
});

/* Containers */
const $modalWrapper = document.getElementById("modal-wrapper")!;
const $modal = document.getElementById("modal-wrapper")!.getElementsByClassName("modal")[0]!;
Expand Down

0 comments on commit 0cb5d4c

Please sign in to comment.