From: Benjamin Auder Date: Sun, 14 Nov 2021 23:02:24 +0000 (+0100) Subject: Fix typo element.id --> element X-Git-Url: https://git.auder.net/doc/current/bundles/framework/images/%24%7BgetWhatsApp%28link%29%7D?a=commitdiff_plain;h=a77150a1f32fe1eae58f0ac3cf1a10223be5830b;p=xogo.git Fix typo element.id --> element --- diff --git a/app.js b/app.js index a011513..592d2a9 100644 --- a/app.js +++ b/app.js @@ -59,7 +59,7 @@ function toggleVisible(element) { if (elt.id != element) elt.style.display = "none"; else elt.style.display = "block"; } - if (element.id == "boardContainer") { + if (element == "boardContainer") { // Avoid smartphone scrolling effects (TODO?) document.querySelector("html").style.overflow = "hidden"; document.body.style.overflow = "hidden"; @@ -67,7 +67,7 @@ function toggleVisible(element) { else { document.querySelector("html").style.overflow = "visible"; document.body.style.overflow = "visible"; - if (element.id == "newGame") { + if (element == "newGame") { // Workaround "superposed texts" effect inputName.focus(); inputName.blur();