Blur then save when command+enter is hit while child input or textarea is focused

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

View File

@ -450,6 +450,10 @@ class CellEditorOverlay extends Component {
if (e.key === 'Enter' && e.metaKey && e.target === this.overlayRef) {
this.handleSaveCell()
}
if (e.key === 'Enter' && e.metaKey && e.target !== this.overlayRef) {
e.target.blur()
setTimeout(this.handleSaveCell, 50)
}
if (e.key === 'Escape' && e.target === this.overlayRef) {
this.props.onCancel()
}