diff --git a/source/Ox.UI/js/Core/Ox.JQueryElement.js b/source/Ox.UI/js/Core/Ox.JQueryElement.js index f164c983..30b6a0c5 100644 --- a/source/Ox.UI/js/Core/Ox.JQueryElement.js +++ b/source/Ox.UI/js/Core/Ox.JQueryElement.js @@ -19,7 +19,7 @@ Ox.JQueryElement = function($element) { that.ox = Ox.VERSION; //@ $element The jQuery-wrapped DOM element that.$element = $element.data({ - oxid: that.id // FIXME: Can this be just "id"? + oxid: that.id }); // FIXME: the following two lines should make it possible to do // $('
').appendTo($element) ... check if it works, then replace all diff --git a/source/Ox.UI/js/Core/Ox.Keyboard.js b/source/Ox.UI/js/Core/Ox.Keyboard.js index a3772582..eac2edef 100644 --- a/source/Ox.UI/js/Core/Ox.Keyboard.js +++ b/source/Ox.UI/js/Core/Ox.Keyboard.js @@ -28,25 +28,27 @@ Ox.Keyboard = (function() { } }); key = keyNames.join('_'); - bound.forEach(function(id) { - Ox.UI.elements[id].triggerEvent('key_' + key); - }); + if (focused === null || !Ox.UI.elements[focused].hasClass('OxInput')) { + bound.forEach(function(id) { + Ox.UI.elements[id].triggerEvent('key_' + key); + }); + } if (focused !== null && bound.indexOf(focused) == -1) { Ox.UI.elements[focused].triggerEvent('key_' + key); // prevent Chrome from scrolling, or going back in history if ( [ 'backspace', 'down', 'left', 'right', 'space', 'up' - ].indexOf(key) > -1 && - !Ox.UI.elements[focused].hasClass('OxInput') && - !Ox.UI.elements[focused].hasClass('OxAutocompleteMenu') + ].indexOf(key) > -1 + && !Ox.UI.elements[focused].hasClass('OxInput') + && !Ox.UI.elements[focused].hasClass('OxAutocompleteMenu') ) { ret = false; } // prevent cursor in input field from moving to start or end if ( - ['down', 'up'].indexOf(key) > -1 && - Ox.UI.elements[focused].hasClass('OxAutocompleteMenu') + ['down', 'up'].indexOf(key) > -1 + && Ox.UI.elements[focused].hasClass('OxAutocompleteMenu') ) { ret = false; }