fix spoiler hidden link click

This commit is contained in:
Ajay Bura 2023-04-16 10:40:38 +05:30 committed by GitHub
parent dcad1840c4
commit 0662ab4233
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');
}
}