From 6d9b0ed8d8a8284ff0044474a239b8679676ec7e Mon Sep 17 00:00:00 2001 From: Z8MB1E Date: Fri, 28 Aug 2026 20:04:15 -0400 Subject: [PATCH] fix(minesweeper): prevent default context menu on right-click for game board --- .../frontend/eod/MinesweeperBoard.tsx | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/components/frontend/eod/MinesweeperBoard.tsx b/src/components/frontend/eod/MinesweeperBoard.tsx index 1309713..d10c298 100644 --- a/src/components/frontend/eod/MinesweeperBoard.tsx +++ b/src/components/frontend/eod/MinesweeperBoard.tsx @@ -504,6 +504,7 @@ export function MinesweeperBoard({ : "flex items-center justify-center p-2", )} style={{ containerType: "inline-size" }} + onContextMenu={(event) => event.preventDefault()} >
)} -
+
event.preventDefault()} + >
@@ -651,9 +655,14 @@ export function MinesweeperBoard({ /> - {phase !== "playing" && ( - <> -
+
+
{DIFFICULTY_KEYS.map((key) => { const option = DIFFICULTIES[key]; return ( @@ -675,8 +684,8 @@ export function MinesweeperBoard({ ); })} -
- {customUnlocked ? ( +
+ {customUnlocked ? (
@@ -783,13 +792,12 @@ export function MinesweeperBoard({ {CUSTOM_MAX_SIZE}×{CUSTOM_MAX_SIZE} field.

- ) : ( -

- Clear all three standard locations to unlock custom minefields. -

- )} - - )} + ) : ( +

+ Clear all three standard locations to unlock custom minefields. +

+ )} +