From 7c368ae0297285a8a6daf55353b5533796a1315b Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Sat, 25 Dec 2021 12:26:20 +0530 Subject: [PATCH] Fix spolier click not working on some browser Signed-off-by: Ajay Bura --- src/app/organisms/room/RoomViewContent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/organisms/room/RoomViewContent.jsx b/src/app/organisms/room/RoomViewContent.jsx index 364d35d..7812591 100644 --- a/src/app/organisms/room/RoomViewContent.jsx +++ b/src/app/organisms/room/RoomViewContent.jsx @@ -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'); }