From 1740ee4ffd1740c408f3a9066ec8b7dd39ccaf54 Mon Sep 17 00:00:00 2001 From: Trond A Ekseth Date: Sat, 19 Nov 2022 17:17:21 +0100 Subject: [PATCH] Don't put the full item container as clickable --- js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/script.js b/js/script.js index 2354ee3..88afb97 100644 --- a/js/script.js +++ b/js/script.js @@ -168,7 +168,7 @@ window.onload = function () { url.innerText = "" }) - document.querySelectorAll("#items").forEach(item => item.addEventListener("click", (e) => { + document.querySelectorAll("#items .item").forEach(item => item.addEventListener("click", (e) => { e.preventDefault() e.target.parentElement.style.pointerEvents = 'none' const disableui = setTimeout((t) => { @@ -182,7 +182,7 @@ window.onload = function () { })) })); - document.querySelectorAll("#ambiance").forEach(item => item.addEventListener("click", (e) => { + document.querySelectorAll("#ambiance .item").forEach(item => item.addEventListener("click", (e) => { e.preventDefault() e.target.parentElement.style.pointerEvents = 'none' const disableui = setTimeout((t) => {