« get me outta code hell

Try to fix backspace going to previous webpage - 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-16 14:47:22 -0300
committerFlorrie <towerofnix@gmail.com>2018-08-16 14:47:22 -0300
commit95fa9eda8c260ce73bad889e6c2a0e03e6a7d0b3 (patch)
tree38aecc891db69a19dc4ace7be00c353ad757799b
parentacd43c6b455515e041a59e1852be0e9701b1107e (diff)
Try to fix backspace going to previous webpage
-rw-r--r--index.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/index.js b/index.js
index 94701c3..abc5d46 100644
--- a/index.js
+++ b/index.js
@@ -1212,6 +1212,8 @@ canvas.addEventListener('keypress', evt => {
 
   if (evt.keyCode === 9) { // Capture tab, but not everything else (like ctrl-R)
     evt.preventDefault()
+  } else if (evt.keyCode === 8) { // Apparently backspace does browser things we don't want
+    evt.preventDefault()
   }
 })