aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-10-04 15:38:39 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-10-04 15:38:39 +0200
commit0a60a1a71e32fa29518705a4f194c8025d8164bf (patch)
treedecacd78b29c45fb08b34e2e38f00f37d7b6e46e /p/scripts
parent783171011dc6256f37cbd4365f5405b5e8a4b44e (diff)
parent7a59568dfc20589c0495235679a96a375e36cfee (diff)
Merge pull request #653 from aledeg/fix-shortcut
Fix shortcut
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js2
-rw-r--r--p/scripts/shortcut.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 37281a907..02d16ca64 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -384,8 +384,6 @@ function collapse_entry() {
}
function user_filter(key) {
- console.log('user filter');
- console.warn(key);
var filter = $('#dropdown-query');
var filters = filter.siblings('.dropdown-menu').find('.item.query a');
if (typeof key === "undefined") {
diff --git a/p/scripts/shortcut.js b/p/scripts/shortcut.js
index debaffbaa..4137172c3 100644
--- a/p/scripts/shortcut.js
+++ b/p/scripts/shortcut.js
@@ -43,7 +43,9 @@ shortcut = {
//Find Which key is pressed
if (e.keyCode) code = e.keyCode;
else if (e.which) code = e.which;
- var character = String.fromCharCode(code).toLowerCase();
+ if( code == 32 || (code >= 48 && code <= 90) || (code >= 96 && code <= 111) || (code >= 186 && code <= 192) || (code >= 219 && code <= 222)) {
+ var character = String.fromCharCode(code).toLowerCase();
+ }
if(code == 188) character=","; //If the user presses , when the type is onkeydown
if(code == 190) character="."; //If the user presses , when the type is onkeydown