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