prevent chrome from scrolling in horizontal icon lists

This commit is contained in:
rolux 2011-04-30 01:17:00 +02:00
parent 0211be527c
commit a5fc65833d

View file

@ -182,9 +182,11 @@
}
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
if (
['down', 'left', 'right', 'space', 'up'].indexOf(key) > -1 &&
!Ox.UI.elements[focused].hasClass('OxInput')
) {
// prevent Chrome from scrolling
return false;
}
}