From a5fc65833d8ddbee66549a256bba460c9dff63eb Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 30 Apr 2011 01:17:00 +0200 Subject: [PATCH] prevent chrome from scrolling in horizontal icon lists --- source/Ox.UI/js/Core/Ox.Keyboard.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/Core/Ox.Keyboard.js b/source/Ox.UI/js/Core/Ox.Keyboard.js index 4f20c651..a95eff2b 100644 --- a/source/Ox.UI/js/Core/Ox.Keyboard.js +++ b/source/Ox.UI/js/Core/Ox.Keyboard.js @@ -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; } }