fix: spoiler hidden link click (#1199)
authorAjay Bura <32841439+ajbura@users.noreply.github.com>
Sun, 16 Apr 2023 12:22:01 +0000 (22:22 +1000)
committerGitHub <noreply@github.com>
Sun, 16 Apr 2023 12:22:01 +0000 (22:22 +1000)
src/app/organisms/room/RoomViewContent.jsx

index 745ece822e706339a7974ac702bafe0f31423554..74bc7e268ae765948299b72e52882ab322b35ebb 100644 (file)
@@ -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');
   }
 }