web/timeline: fix unspoilering spoilers

This commit is contained in:
Tulir Asokan 2024-10-17 23:09:37 +03:00
parent 00630f997d
commit d1dedd51fe
2 changed files with 2 additions and 2 deletions

View file

@ -179,7 +179,7 @@ div.html-body {
max-width: 72px; max-width: 72px;
} }
span[data-mx-spoiler], span.hicli-spoiler { span.hicli-spoiler {
filter: blur(4px); filter: blur(4px);
transition: filter .5s; transition: filter .5s;
cursor: pointer; cursor: pointer;

View file

@ -22,7 +22,7 @@ import { EventContentProps } from "./props.ts"
import DownloadIcon from "@/icons/download.svg?react" import DownloadIcon from "@/icons/download.svg?react"
const onClickHTML = (evt: React.MouseEvent<HTMLDivElement>) => { const onClickHTML = (evt: React.MouseEvent<HTMLDivElement>) => {
if ((evt.target as HTMLElement).closest("span[data-mx-spoiler]")?.classList.toggle("spoiler-revealed")) { if ((evt.target as HTMLElement).closest("span.hicli-spoiler")?.classList.toggle("spoiler-revealed")) {
// When unspoilering, don't trigger links and other clickables inside the spoiler // When unspoilering, don't trigger links and other clickables inside the spoiler
evt.preventDefault() evt.preventDefault()
} }