1
0
Fork 0
forked from 0x2620/oxjs

make (almost all of) form demo work again

This commit is contained in:
rolux 2011-05-12 06:15:01 +02:00
commit c5408a6656
11 changed files with 37 additions and 26 deletions

View file

@ -60,10 +60,12 @@
key = keyNames.join('_');
if (focused !== null) {
Ox.UI.elements[focused].triggerEvent('key_' + key);
// prevent Chrome from going back in history, or scrolling
// prevent Chrome fromor scrolling
// fixme: backspace -> history.back, blocking it doesn't work
// when the autocomplete menu of an input element has focus
if (
[
'backspace', 'down', 'left', 'right', 'space', 'up'
'down', 'left', 'right', 'space', 'up'
].indexOf(keyBasename) > -1 &&
!Ox.UI.elements[focused].hasClass('OxInput')
) {