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) { if (focused !== null) {
Ox.UI.elements[focused].triggerEvent('key_' + key); Ox.UI.elements[focused].triggerEvent('key_' + key);
// fixme: oxdb context browser suggests we should add left and right keys here if (
if (['down', 'space', 'up'].indexOf(key) > -1 && !Ox.UI.elements[focused].hasClass('OxInput')) { ['down', 'left', 'right', 'space', 'up'].indexOf(key) > -1 &&
// prevent chrome from scrolling !Ox.UI.elements[focused].hasClass('OxInput')
) {
// prevent Chrome from scrolling
return false; return false;
} }
} }