Avoid triggering on some more special keys
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Fri, 12 Aug 2011 14:34:11 -0600
changeset 522 7b8688822cdd
parent 521 4666c01ce06e
child 523 f18ac9086744
Avoid triggering on some more special keys
editor.html
--- a/editor.html	Thu Aug 11 15:46:50 2011 -0600
+++ b/editor.html	Fri Aug 12 14:34:11 2011 -0600
@@ -24,7 +24,7 @@
 
 <script>
 document.querySelector("[contenteditable]").onkeypress = function(e) {
-	if (e.altKey || e.ctrlKey) {
+	if (e.altKey || e.ctrlKey || (e.which == 0 && e.charCode == 0)) {
 		return true;
 	}
 	if (e.keyCode == 13 && !e.shiftKey) {