aboutsummaryrefslogtreecommitdiff
path: root/src/components/follow.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/follow.js')
-rw-r--r--src/components/follow.js12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/components/follow.js b/src/components/follow.js
index 365bb20..25db0c4 100644
--- a/src/components/follow.js
+++ b/src/components/follow.js
@@ -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() {