Fix spolier click not working on some browser
authorAjay Bura <ajbura@gmail.com>
Sat, 25 Dec 2021 06:56:20 +0000 (12:26 +0530)
committerAjay Bura <ajbura@gmail.com>
Sat, 25 Dec 2021 06:56:20 +0000 (12:26 +0530)
Signed-off-by: Ajay Bura <ajbura@gmail.com>
src/app/organisms/room/RoomViewContent.jsx

index 364d35d1f69ccbc17b88422aebd570d03842fb25..78125912bc3272f358a9d933dc8f1eabfac9ccf6 100644 (file)
@@ -82,7 +82,7 @@ function handleOnClickCapture(e) {
     openProfileViewer(userId, roomId);
   }
 
-  const spoiler = nativeEvent.path.find((el) => el?.hasAttribute?.('data-mx-spoiler'));
+  const spoiler = nativeEvent.composedPath().find((el) => el?.hasAttribute?.('data-mx-spoiler'));
   if (spoiler) {
     spoiler.classList.toggle('data-mx-spoiler--visible');
   }