commit | 6a535d4d02066fdfdec8fd094a75c70cadd30d6c | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Wed Aug 26 20:16:58 2015 +0200 |
committer | Akron <nils@diewald-online.de> | Wed Aug 26 20:16:58 2015 +0200 |
tree | 617edd0ee233f1c706049461626e1b883c5e11c7 | |
parent | 792f58bf1f1f2c09f22fa5bd58d8bef327a3d5bb [diff] [blame] |
Improved tabbing
diff --git a/dev/js/src/util.js b/dev/js/src/util.js index f17ec2a..00a2bd5 100644 --- a/dev/js/src/util.js +++ b/dev/js/src/util.js
@@ -35,6 +35,14 @@ node.removeChild(node.firstChild); }; +// Utility to get either the charCode +// or the keyCode of an event +function _codeFromEvent (e) { + if ((e.charCode) && (e.keyCode==0)) + return e.charCode + return e.keyCode; +}; + define(function () { // Todo: That's double now!