forked from 0x2620/oxjs
fix bug with keyboard events
This commit is contained in:
parent
5f417fa152
commit
0211be527c
4 changed files with 15 additions and 14 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue