keyboard controller: don't trigger events when input _or autocomplete menu_ has focus

This commit is contained in:
rlx 2012-11-03 16:39:30 +00:00
parent cacd1e147f
commit abb76703ce

View file

@ -31,7 +31,12 @@ Ox.Keyboard = (function() {
} }
}); });
key = keyNames.join('_'); key = keyNames.join('_');
if (focused === null || !$focused.hasClass('OxInput')) { if (
focused === null || (
!$focused.hasClass('OxInput')
&& !$focused.hasClass('OxAutocompleteMenu')
)
) {
bound.forEach(function(id) { bound.forEach(function(id) {
Ox.UI.elements[id].triggerEvent('key_' + key); Ox.UI.elements[id].triggerEvent('key_' + key);
}); });