<details> 내부에서 스포일러가 토글되지 않습니다

100% 확신은 없지만, 다음 단계를 거치면 문제가 재현될 것 같습니다:

  1. 새 게시글 작성을 시작합니다.
  2. 텍스트를 추가하고 그 주위에 [spoiler] 태그를 붙입니다.
  3. 게시글 미리보기에서 텍스트를 흐림 해제합니다. 흐림을 다시 걸거나 해제하는 것을 원하는 만큼 반복할 수 있습니다.
  4. 스포일러 텍스트 아래에 더 많은 텍스트를 추가합니다.
  5. 텍스트를 흐림 상태로 두었다가 한 번만 흐림을 해제한 경우, 그 이후(또는 이미 흐림이 해제되어 있었다면 즉시) 텍스트를 다시 흐림 상태로 만들 수 없습니다.

이 문제는 게시글 미리보기에서만 발생하는 것이 아니라 실제 게시글에서도 발생할 수 있습니다. 거기에 재현하는 정확한 단계는 확신하지 못합니다(흐림 해제와 다시 흐림 만들기 사이에 더 이상 입력할 수 없기 때문)만, 제가 이 문제를 목격한 한 상황에서는 흐림 처리된 텍스트가 details 태그 안에 있었습니다. 이것이 관련이 있는지 여부는 알 수 없습니다.


다음은 테스트용이지만 도움이 될 수도 있고 아닐 수도 있습니다.

일부 스포일러 텍스트

스포일러 텍스트 이후의 텍스트.

요약

더 많은 스포일러 텍스트

스포일러 텍스트 이후의 더 많은 텍스트.

스포일러 텍스트와 details 태그 이후의 더 많은 텍스트.

3개의 좋아요

I’ve noticed that spoilers can’t be toggled off when they’re inside a <details> tag.

This spoiler can be toggled on and off (works as expected).

However, this doesn’t:

Click to open 'details'

This spoiler can only be toggled on once (it can’t be toggled off).

I think the issue is that, in the second case, the isInteractive function returns true because details is included in INTERACTIVE_SELECTOR.

Removing it should be enough, but I’m not really sure what the side effects will be (maybe @CvX knows).

EDIT: I see this change was motivated by wanting to make GIFs stop on click. In our community, we make heavy use of spoilers and details, so it would be useful to make the blurring behavior more consistent.

2개의 좋아요

Explanation

When spoiler text is put into a details folder, it can be unblurred as per usual by clicking on it, but clicking again does nothing, and it cannot be reblurred. Closing and reopening the details folder is ineffective. My explanation of this on the Hopscotch Forum explains this better.

Demonstration

Feel free to use this details folder as an example. My exact process is explained on the Hopscotch Forum topic.

Details folder

Sample text

How to reproduce

  1. Create a post with a details folder
  2. Put spoiler text into it
  3. Open the folder and unblur the text
  4. The text cannot reblur without reloading the page
2개의 좋아요

Thanks for the repro steps. This is a minor inconvenience(especially since it’s inside a togglable block so we can hide the content by toggling details), but a fix could be welcome.
I will put a pr-welcome on the topic if someone wants to give it a try on fixing it.

The plugin repo is here: GitHub - discourse/discourse-spoiler-alert: A plugin for discourse to hide spoilers behind the spoiler-alert jQuery plugin · GitHub

But I have the feeling it’s more of a Hide Details feature issue.

Content in Hide Details doesn’t always display (and interact as well?) as expected. For example, hotlinked pictures, links, videos etc won’t be displayed. It will only show the links:

Summary

https://cdn.discordapp.com/attachments/914531040297635861/1107226488534740992/1920x1080.png

https://www.youtube.com/watch?v=ipuqLy87-3A

Apex Legends pro sweet hits Predator rank with no kills to “prove how bad” Ranked is - Dexerto

4개의 좋아요

Thank you!

1개의 좋아요

[spoiler][/spoiler] 태그가 [details][/details] 블록 내부에 있는 경우, 일반 텍스트와 달리 클릭 한 번으로 흐림 효과를 제거하고 다시 클릭하여 흐림 효과를 재적용할 수 없습니다.

예시:

[spoiler]Text[/spoiler]

[details]
[spoiler]Text[/spoiler]
[/details]

Text

Text


안녕하세요 @Noble_Fish, 이 문제를 다시 언급해 주셔서 감사합니다! 방금 수정 사항을 공개했습니다. 곧 사용 가능할 것입니다.

4개의 좋아요

이 주제는 5일 후 자동으로 닫혔습니다. 더 이상 답변을 남길 수 없습니다.