This commit is contained in:
Shin'ya Ueoka 2017-10-21 10:13:20 +09:00
parent 941073404b
commit c2a663a64d

View file

@ -47,17 +47,14 @@ export default class InputComponent {
return;
}
let stop = false;
for (let listener of this.onKeyListeners) {
stop = stop || listener(e.key, e.ctrlKey);
let stop = listener(e.key, e.ctrlKey);
if (stop) {
e.preventDefault();
e.stopPropagation();
break;
}
}
if (stop) {
e.preventDefault();
e.stopPropagation();
}
}
fromInput(e) {