summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyfraeviolae <cyfraeviolae>2022-02-26 01:02:44 -0500
committercyfraeviolae <cyfraeviolae>2022-02-26 01:02:44 -0500
commit04133a424cde34fbce3978e538f8db105cadbe9f (patch)
tree67f62c2b29d37ff25b115e8b264104e2e83559cb
parent2e3e6d8cbf5b32be8410437af9379b7f336f7884 (diff)
focus
-rw-r--r--index.html2
-rw-r--r--static/script.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/index.html b/index.html
index 1805be4..ad76874 100644
--- a/index.html
+++ b/index.html
@@ -29,7 +29,7 @@
Write a line of poetry. Syllables in dark boxes should be stressed.
</p>
<div id="entry"></div>
- <input id="kb" type="text" style="display:none;"></input>
+ <input id="kb" type="text" style="isplay:none;"></input>
<div id="btns">
<button id="check" type="submit">Check</button>
<button id="clear">Clear</button>
diff --git a/static/script.js b/static/script.js
index 37c5725..2516256 100644
--- a/static/script.js
+++ b/static/script.js
@@ -192,8 +192,8 @@ document.addEventListener('keydown', function(e) {
})
document.addEventListener('mousedown', function(e) {
- console.log('click', e.target)
if (Array.from(e.target.classList).includes('entrybox')) {
+ e.preventDefault();
unfocus(document.querySelector(`[data-offset="${focused}"]`));
focus(e.target);
}