diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-02 21:04:13 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2017-11-02 21:04:13 +0900 |
commit | 774a960a835b3f37b36ff69e1b9fcc8975f7c2f0 (patch) | |
tree | 9bdbd9a49001e97165700c872b690f1409b83e0c | |
parent | 3a1940a0c324cbaca85dd50ec1efe23327ec133d (diff) |
remove comparison with previous value
-rw-r--r-- | src/console/components/console.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/console/components/console.js b/src/console/components/console.js index 4a4b66a..8b69df9 100644 --- a/src/console/components/console.js +++ b/src/console/components/console.js @@ -4,7 +4,6 @@ import * as consoleActions from 'console/actions/console'; export default class ConsoleComponent { constructor(wrapper, store) { this.wrapper = wrapper; - this.prevValue = ''; this.prevState = {}; this.completionOrigin = ''; this.store = store; @@ -50,19 +49,13 @@ export default class ConsoleComponent { } onInput(e) { - let targetValue = e.target.value; - if (targetValue === this.prevValue) { - return; - } - let doc = this.wrapper.ownerDocument; let input = doc.querySelector('#vimvixen-console-command-input'); this.completionOrigin = input.value; - this.prevValue = targetValue; return browser.runtime.sendMessage({ type: messages.CONSOLE_QUERY_COMPLETIONS, - text: targetValue + text: e.target.value, }).then((completions) => { this.store.dispatch(consoleActions.setCompletions(completions)); }); @@ -107,7 +100,6 @@ export default class ConsoleComponent { input.focus(); window.focus(); - this.prevValue = ''; this.onInput({ target: input }); } |