mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-19 18:13:41 -05:00
web/timeline: fix unspoilering spoilers
This commit is contained in:
parent
00630f997d
commit
d1dedd51fe
2 changed files with 2 additions and 2 deletions
|
@ -179,7 +179,7 @@ div.html-body {
|
|||
max-width: 72px;
|
||||
}
|
||||
|
||||
span[data-mx-spoiler], span.hicli-spoiler {
|
||||
span.hicli-spoiler {
|
||||
filter: blur(4px);
|
||||
transition: filter .5s;
|
||||
cursor: pointer;
|
||||
|
|
|
@ -22,7 +22,7 @@ import { EventContentProps } from "./props.ts"
|
|||
import DownloadIcon from "@/icons/download.svg?react"
|
||||
|
||||
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
|
||||
evt.preventDefault()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue