Prevent clicking spoilers from opening thread

This commit is contained in:
Ryan Fox 2021-01-30 03:37:04 +00:00
parent 21ccfe7e52
commit a0b3970747
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E

View File

@ -56,8 +56,8 @@ attachmentPreview context sensitive attachments ({ url, preview_url } as attachm
in
li [ class "attachment-entry" ] <|
if nsfw then
[ input [ type_ "radio", id attId ] []
, label [ for attId ]
[ input [ onClickWithStop NoOp, type_ "radio", id attId ] []
, label [ onClickWithStop NoOp, for attId ]
[ text "Sensitive content"
, br [] []
, br [] []
@ -166,13 +166,10 @@ statusContentView context status =
"spoiler" ++ extractStatusId status.id ++ context
in
div [ class "status-text spoiled" ]
[ div
[ class "spoiler"
, onClickWithStop <| OpenThread status
]
[ div [ class "spoiler" ]
[ text status.spoiler_text ]
, input [ type_ "checkbox", id statusId, class "spoiler-toggler" ] []
, label [ for statusId ] [ text "Reveal content" ]
, input [ onClickWithStop NoOp, type_ "checkbox", id statusId, class "spoiler-toggler" ] []
, label [ onClickWithStop NoOp, for statusId ] [ text "Reveal content" ]
, div [ class "spoiled-content" ]
[ div [] <| formatContent status.content status.mentions
, attachmentListView context status