Update completion-modal.tsx (#42842)

This commit is contained in:
Adriano Cangiamila
2021-07-14 16:43:14 +01:00
committed by GitHub
parent fc0511bd91
commit 480afedd62

View File

@ -171,7 +171,7 @@ export class CompletionModalInner extends Component<
}
handleKeypress(e: React.KeyboardEvent): void {
if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) {
if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
e.preventDefault();
// Since Hotkeys also listens to Ctrl + Enter we have to stop this event
// getting to it.