follow from content-input

This commit is contained in:
Shin'ya Ueoka 2017-10-08 09:56:54 +09:00
parent 6f9b217df8
commit e2aae9cff2
3 changed files with 9 additions and 9 deletions

View file

@ -22,9 +22,6 @@ export default class FollowComponent {
this.store = store;
this.hintElements = {};
this.state = {};
let doc = wrapper.ownerDocument;
doc.addEventListener('keydown', this.onKeyDown.bind(this));
}
update() {
@ -39,12 +36,11 @@ export default class FollowComponent {
}
}
onKeyDown(e) {
key(key) {
if (!this.state.enabled) {
return;
return false;
}
let { key } = e;
switch (key) {
case 'Enter':
this.activate(this.hintElements[this.state.keys].target);
@ -62,9 +58,7 @@ export default class FollowComponent {
}
break;
}
e.stopPropagation();
e.preventDefault();
return true;
}
updateHints() {