Blur child inputs or textareas when escape key pressed
parent
d2e5a2bd86
commit
ebe25e6ac2
|
@ -453,6 +453,10 @@ class CellEditorOverlay extends Component {
|
||||||
if (e.key === 'Escape' && e.target === this.overlayRef) {
|
if (e.key === 'Escape' && e.target === this.overlayRef) {
|
||||||
this.props.onCancel()
|
this.props.onCancel()
|
||||||
}
|
}
|
||||||
|
if (e.key === 'Escape' && e.target !== this.overlayRef) {
|
||||||
|
e.target.blur()
|
||||||
|
this.overlayRef.focus()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
Loading…
Reference in New Issue