fix nasty key event bug
This commit is contained in:
parent
0f1f666672
commit
528601eb6c
1 changed files with 2 additions and 2 deletions
|
|
@ -292,12 +292,12 @@ ace.addKeyListener = function(el, callback) {
|
|||
var lastDown = null;
|
||||
|
||||
ace.addListener(el, "keydown", function(e) {
|
||||
lastDown = e.keyCode;
|
||||
lastDown = e.keyIdentifier || e.keyCode;
|
||||
return callback(e);
|
||||
});
|
||||
|
||||
ace.addListener(el, "keypress", function(e) {
|
||||
var keyId = e.keyCode;
|
||||
var keyId = e.keyIdentifier || e.keyCode;
|
||||
if (lastDown !== keyId) {
|
||||
return callback(e);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue