From da92ce3a46ab4f702f518c728437b1fb574ef0fc Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sun, 16 Apr 2023 22:22:01 +1000 Subject: [PATCH] fix: spoiler hidden link click (#1199) --- src/app/organisms/room/RoomViewContent.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/organisms/room/RoomViewContent.jsx b/src/app/organisms/room/RoomViewContent.jsx index 745ece8..74bc7e2 100644 --- a/src/app/organisms/room/RoomViewContent.jsx +++ b/src/app/organisms/room/RoomViewContent.jsx @@ -114,6 +114,7 @@ function handleOnClickCapture(e) { const spoiler = nativeEvent.composedPath().find((el) => el?.hasAttribute?.('data-mx-spoiler')); if (spoiler) { + if (!spoiler.classList.contains('data-mx-spoiler--visible')) e.preventDefault(); spoiler.classList.toggle('data-mx-spoiler--visible'); } }