Skip to content

Commit

Permalink
Use event.code as a fallback to event.key (#407)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgoTrader authored and moroshko committed Jul 28, 2017
1 parent abcb43d commit e79ff42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Autosuggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e79ff42

Please sign in to comment.