Blur child inputs or textareas when escape key pressed

pull/10616/head
Alex P 2018-02-07 11:29:07 -08:00
parent d2e5a2bd86
commit ebe25e6ac2
1 changed files with 4 additions and 0 deletions

View File

@ -453,6 +453,10 @@ class CellEditorOverlay extends Component {
if (e.key === 'Escape' && e.target === this.overlayRef) {
this.props.onCancel()
}
if (e.key === 'Escape' && e.target !== this.overlayRef) {
e.target.blur()
this.overlayRef.focus()
}
}
render() {