Fix Disclaimer Open on ESC (#1245)

* Don’t listen to escape while modal is closed.

* Remove console
This commit is contained in:
William O'Beirne 2018-03-05 14:00:54 -05:00 committed by Daniel Ternyak
parent e45324e7f1
commit d0379b19a0
1 changed files with 4 additions and 0 deletions

View File

@ -97,6 +97,10 @@ export default class Modal extends PureComponent<Props, {}> {
};
private escapeListner = (ev: KeyboardEvent) => {
if (!this.props.isOpen) {
return;
}
// Don't trigger if they hit escape while on an input
if (ev.target) {
if (