fix: spoiler hidden link click (#1199)
This commit is contained in:
parent
dcad1840c4
commit
da92ce3a46
1 changed files with 1 additions and 0 deletions
|
@ -114,6 +114,7 @@ function handleOnClickCapture(e) {
|
||||||
|
|
||||||
const spoiler = nativeEvent.composedPath().find((el) => el?.hasAttribute?.('data-mx-spoiler'));
|
const spoiler = nativeEvent.composedPath().find((el) => el?.hasAttribute?.('data-mx-spoiler'));
|
||||||
if (spoiler) {
|
if (spoiler) {
|
||||||
|
if (!spoiler.classList.contains('data-mx-spoiler--visible')) e.preventDefault();
|
||||||
spoiler.classList.toggle('data-mx-spoiler--visible');
|
spoiler.classList.toggle('data-mx-spoiler--visible');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue