From abb76703ce44ea3cb477ab6454ec43a276266265 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sat, 3 Nov 2012 16:39:30 +0000 Subject: [PATCH] keyboard controller: don't trigger events when input _or autocomplete menu_ has focus --- source/Ox.UI/js/Core/Keyboard.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/Ox.UI/js/Core/Keyboard.js b/source/Ox.UI/js/Core/Keyboard.js index 469f7920..7a271fc0 100644 --- a/source/Ox.UI/js/Core/Keyboard.js +++ b/source/Ox.UI/js/Core/Keyboard.js @@ -31,7 +31,12 @@ Ox.Keyboard = (function() { } }); key = keyNames.join('_'); - if (focused === null || !$focused.hasClass('OxInput')) { + if ( + focused === null || ( + !$focused.hasClass('OxInput') + && !$focused.hasClass('OxAutocompleteMenu') + ) + ) { bound.forEach(function(id) { Ox.UI.elements[id].triggerEvent('key_' + key); });