diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-21 10:13:20 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-10-21 10:13:20 +0900 |
commit | c2a663a64d23816821d333c0d1c7c7c968f494b0 (patch) | |
tree | 81246f6e8ae6e34f1cb30fdcc5eca9dc65c86e9f | |
parent | 941073404b534d7f79e90f29b514a5f06fb8080d (diff) |
clean
-rw-r--r-- | src/content/components/common/input.js | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/content/components/common/input.js b/src/content/components/common/input.js index df09894..2de0d7d 100644 --- a/src/content/components/common/input.js +++ b/src/content/components/common/input.js @@ -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) { |