fix preventing defaults in keyboard handler
This commit is contained in:
parent
baeeff366e
commit
06dde25efe
1 changed files with 3 additions and 2 deletions
|
@ -81,6 +81,7 @@
|
|||
}).map(function(key) {
|
||||
return Ox.MODIFIER_KEYS[key];
|
||||
}).concat(keyName).join('_'),
|
||||
event = 'key.' + key,
|
||||
triggerEvent = function() {
|
||||
if ($element) {
|
||||
$element.triggerEvent.apply($element, arguments);
|
||||
|
@ -90,7 +91,7 @@
|
|||
);
|
||||
}
|
||||
};
|
||||
triggerEvent('key.' + key, e);
|
||||
triggerEvent(event, e);
|
||||
if (isKeysEventKey(key)) {
|
||||
// don't register leading spaces or trailing double spaces
|
||||
if (keyName != 'space' || (
|
||||
|
@ -109,7 +110,7 @@
|
|||
resetTimeout = setTimeout(function() {
|
||||
keys = '';
|
||||
}, 1000);
|
||||
if (hasCallback[key]) {
|
||||
if (hasCallback[event]) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue