Skip to content

Commit

Permalink
[fixed] Fix missing returns in keydown helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Métral authored and diasbruno committed Oct 14, 2022
1 parent 15e0711 commit 28ea6b5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/ModalPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ const CLASS_NAMES = {
* `KeyboardEvent.code` for apps that still support IE11. Can be removed when
* `react-modal` only supports React >18 (which dropped IE support).
*/
const isTabKey = event => {
event.code === "Tab" || event.keyCode === 9;
};
const isEscKey = event => {
event.code === "Escape" || event.keyCode === 27;
};
const isTabKey = event => event.code === "Tab" || event.keyCode === 9;
const isEscKey = event => event.code === "Escape" || event.keyCode === 27;

let ariaHiddenInstances = 0;

Expand Down

0 comments on commit 28ea6b5

Please sign in to comment.