Skip to content

Commit

Permalink
add preventDefault for non-Tab, const keys in onKeyDown
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnC-80 committed Oct 26, 2020
1 parent 624aef1 commit 1a472b1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/DayPicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ class DayPicker extends React.PureComponent {
e.stopPropagation();

if (!MODIFIER_KEY_NAMES.has(e.key)) {
if (e.key !== 'Tab') e.preventDefault();
this.throttledKeyDown(e);
}
}
Expand Down

0 comments on commit 1a472b1

Please sign in to comment.