From bafa8f4e2462d5cf56ba23cce41077864254cae8 Mon Sep 17 00:00:00 2001 From: thislight Date: Fri, 1 Nov 2024 16:16:44 +0800 Subject: [PATCH] TootList: prevent clicks of A lift the toot --- src/timelines/TootList.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/timelines/TootList.tsx b/src/timelines/TootList.tsx index 7c712b6..6145b75 100644 --- a/src/timelines/TootList.tsx +++ b/src/timelines/TootList.tsx @@ -106,9 +106,9 @@ const TootList: Component<{ const target = actionableElement as HTMLAnchorElement; - const acct = - encodeURIComponent(target.dataset.client || - `@${new URL(target.href).origin}`); + const acct = encodeURIComponent( + target.dataset.client || `@${new URL(target.href).origin}`, + ); navigate(`/${acct}/profile/${target.dataset.acctId}`); @@ -116,6 +116,11 @@ const TootList: Component<{ } else { console.warn("unknown action", actionableElement.dataset.rel); } + } else if ( + event.target.parentElement && + event.target.parentElement.tagName === "A" + ) { + return; } // else if (!actionableElement || !checkIsExpended(status) || )