From: Jacob Casper Date: Mon, 7 Feb 2022 21:32:59 +0000 (-0600) Subject: Fix comment composition X-Git-Tag: v0.6~2 X-Git-Url: https://git.jacobcasper.com/?p=hnim.git;a=commitdiff_plain;h=066f03c1004a1182338538e8f59d7fb39f208f0a Fix comment composition Don't allow controlling, re-directing window, etc. while attempting to compose a comment. --- diff --git a/hnim.js b/hnim.js index ab854f8..3910014 100644 --- a/hnim.js +++ b/hnim.js @@ -51,7 +51,7 @@ change(e.target.closest("tr.athing")); }) document.addEventListener("keydown", (e) => { - if (e.isComposing) { + if (e.target.type === 'textarea' || e.isComposing) { return; } switch (e.key) {