Fix Disclaimer Open on ESC (#1245)
* Don’t listen to escape while modal is closed. * Remove console
This commit is contained in:
parent
e45324e7f1
commit
d0379b19a0
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue