From 0228001aa48629f2e6109d29a001b11520cfe4e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Sat, 11 Apr 2020 00:12:19 +0200 Subject: [PATCH] replace keyCode with key, fix #661 --- examples/Components/Routes/Suggestions/index.vue | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/Components/Routes/Suggestions/index.vue b/examples/Components/Routes/Suggestions/index.vue index 23945b075..5c445e1fa 100644 --- a/examples/Components/Routes/Suggestions/index.vue +++ b/examples/Components/Routes/Suggestions/index.vue @@ -103,18 +103,17 @@ export default { }, // is called on every keyDown event while a suggestion is active onKeyDown: ({ event }) => { - // pressing up arrow - if (event.keyCode === 38) { + if (event.key === 'ArrowUp') { this.upHandler() return true } - // pressing down arrow - if (event.keyCode === 40) { + + if (event.key === 'ArrowDown') { this.downHandler() return true } - // pressing enter - if (event.keyCode === 13) { + + if (event.key === 'Enter') { this.enterHandler() return true }