fix: spoiler hidden link click (#1199)

This commit is contained in:
Ajay Bura 2023-04-16 22:22:01 +10:00 committed by array-in-a-matrix
parent 23580c9de7
commit 8efebf1fde

View file

@ -114,6 +114,7 @@ function handleOnClickCapture(e) {
const spoiler = nativeEvent.composedPath().find((el) => el?.hasAttribute?.('data-mx-spoiler'));
if (spoiler) {
if (!spoiler.classList.contains('data-mx-spoiler--visible')) e.preventDefault();
spoiler.classList.toggle('data-mx-spoiler--visible');
}
}