From e79ff42662e1bd6fdb5facc890488c2df5b9629c Mon Sep 17 00:00:00 2001 From: AlgoTrader Date: Fri, 28 Jul 2017 13:28:48 +0300 Subject: [PATCH] Use event.code as a fallback to event.key (#407) --- src/Autosuggest.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Autosuggest.js b/src/Autosuggest.js index cd311f26..4cfd0684 100644 --- a/src/Autosuggest.js +++ b/src/Autosuggest.js @@ -525,7 +525,8 @@ export default class Autosuggest extends Component { } }, onKeyDown: (event, data) => { - switch (event.key) { + const keyCode = event.key || event.code; + switch (keyCode) { case 'ArrowDown': case 'ArrowUp': if (isCollapsed) {