« get me outta code hell

Focus canvas automatically - csb-game - Pixelly spin-off of the Command Synergy Battle system used in Final Fantasy XIII
summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2018-08-12 13:57:04 -0300
committerFlorrie <towerofnix@gmail.com>2018-08-12 13:57:04 -0300
commit18c9b2e603372d61bebb21c41b2fcdbdb60616a7 (patch)
tree72d3aa8eb195da9845b442b4c60cc8457076446e
parente2f66f4027367814be6087dbd6b07f11e31da580 (diff)
Focus canvas automatically
-rw-r--r--index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.js b/index.js
index ce4cf58..d83a00b 100644
--- a/index.js
+++ b/index.js
@@ -754,4 +754,6 @@ canvas.addEventListener('keypress', evt => {
   }
 })
 
+canvas.focus()
+
 requestAnimationFrame(drawLoop)