TootList: prevent clicks of A lift the toot

This commit is contained in:
thislight 2024-11-01 16:16:44 +08:00
parent e68384349a
commit bafa8f4e24
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -106,9 +106,9 @@ const TootList: Component<{
const target = actionableElement as HTMLAnchorElement; const target = actionableElement as HTMLAnchorElement;
const acct = const acct = encodeURIComponent(
encodeURIComponent(target.dataset.client || target.dataset.client || `@${new URL(target.href).origin}`,
`@${new URL(target.href).origin}`); );
navigate(`/${acct}/profile/${target.dataset.acctId}`); navigate(`/${acct}/profile/${target.dataset.acctId}`);
@ -116,6 +116,11 @@ const TootList: Component<{
} else { } else {
console.warn("unknown action", actionableElement.dataset.rel); console.warn("unknown action", actionableElement.dataset.rel);
} }
} else if (
event.target.parentElement &&
event.target.parentElement.tagName === "A"
) {
return;
} }
// else if (!actionableElement || !checkIsExpended(status) || <rel is not one of known action>) // else if (!actionableElement || !checkIsExpended(status) || <rel is not one of known action>)