Skip to content

Commit

Permalink
fix: use event.key for events
Browse files Browse the repository at this point in the history
  • Loading branch information
satazor committed Oct 3, 2018
1 parent 5947b96 commit ee9fdea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/popover/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default class Popover extends Component {
};

handleKeyUp = (e) => {
if (e.keyCode === 27) {
if (e.key === 'Escape') {
this.props.onRequestClose && this.props.onRequestClose(e, 'escapePress');
}
};
Expand Down

0 comments on commit ee9fdea

Please sign in to comment.