fix: spoiler hidden link click (#1199)

This commit is contained in:
Ajay Bura 2023-04-16 22:22:01 +10:00 committed by GitHub
parent dcad1840c4
commit da92ce3a46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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');
}
}