Explorar o código

Modify to avoid to blur while composing (#775)

Sosuke Suzuki %!s(int64=5) %!d(string=hai) anos
pai
achega
2bb95f0651
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/components/ProjectName.tsx

+ 3 - 0
src/components/ProjectName.tsx

@@ -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();
     }
   };