From f6487d86fd31295ab318920e973d41ba7441232f Mon Sep 17 00:00:00 2001 From: Solomon Victorino Date: Sun, 23 Jun 2024 18:01:04 -0600 Subject: [PATCH] fix: don't error when clicks dispatch on annotation link child reproducible by clicking on lyrics in or tags --- static/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/script.js b/static/script.js index 1336945..49fa883 100644 --- a/static/script.js +++ b/static/script.js @@ -26,7 +26,7 @@ window.addEventListener("load", () => { function getAnnotation(e) { e.preventDefault() //document.querySelector('.annotation')?.remove() - const link = e.target.parentElement + const link = e.currentTarget const uri = link.getAttribute("href") const presentAnnotation = link.nextElementSibling.matches(".annotation") && link.nextElementSibling if (presentAnnotation) {