1
0
Fork 0
forked from 0x2620/oxjs

correct docs, add comments

This commit is contained in:
rolux 2013-12-07 13:03:34 +01:00
commit 6dbdf91259
2 changed files with 3 additions and 1 deletions

View file

@ -31,6 +31,7 @@ Ox.Keyboard = (function() {
}
});
key = keyNames.join('_');
// If no input element has focus, invoke global handlers
if (
focused === null || (
!$focused.hasClass('OxInput')
@ -50,6 +51,7 @@ Ox.Keyboard = (function() {
event.preventDefault();
}
}
// If the focused element is not bound globally, invoke element handlers
if (focused !== null && bound.indexOf(focused) == -1) {
$focused.triggerEvent('key_' + key);
// prevent Chrome from scrolling, or going back in history