1
0
Fork 0
forked from 0x2620/oxjs

fix bug with keyboard events

This commit is contained in:
rolux 2011-04-30 00:56:46 +02:00
commit 0211be527c
4 changed files with 15 additions and 14 deletions

View file

@ -180,11 +180,13 @@
buffer += key == 'SPACE' ? ' ' : key;
bufferTime = time;
}
focused !== null && Ox.UI.elements[focused].triggerEvent('key_' + key);
// fixme: oxdb context browser suggests we should add left and right keys here
if (['down', 'space', 'up'].indexOf(key) > -1 && !Ox.UI.elements[focused].hasClass('OxInput')) {
// prevent chrome from scrolling
return false;
if (focused !== null) {
Ox.UI.elements[focused].triggerEvent('key_' + key);
// fixme: oxdb context browser suggests we should add left and right keys here
if (['down', 'space', 'up'].indexOf(key) > -1 && !Ox.UI.elements[focused].hasClass('OxInput')) {
// prevent chrome from scrolling
return false;
}
}
/*
stack.forEach(function(v) {