Преглед изворни кода

Modify to avoid to blur while composing (#775)

Sosuke Suzuki пре 5 година
родитељ
комит
2bb95f0651
1 измењених фајлова са 3 додато и 0 уклоњено
  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();
     }
   };