Modify to avoid to blur while composing (#775)

This commit is contained in:
Sosuke Suzuki
2020-02-17 17:44:08 +09:00
committed by GitHub
parent c4dbb7ca45
commit 2bb95f0651

View File

@ -25,6 +25,9 @@ export class ProjectName extends Component<Props> {
private handleKeyDown = (e: React.KeyboardEvent<HTMLElement>) => {
if (e.key === "Enter") {
e.preventDefault();
if (e.nativeEvent.isComposing || e.keyCode === 229) {
return;
}
e.currentTarget.blur();
}
};