From 03ae355a043a0231fbc665a0d38056b0deab4804 Mon Sep 17 00:00:00 2001 From: xioxin <5716100+xioxin@users.noreply.github.com> Date: Tue, 24 May 2022 14:56:23 +0800 Subject: [PATCH] Compatible with text composition system --- src/components/input.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/input.tsx b/src/components/input.tsx index bf9de68..2a69cd1 100644 --- a/src/components/input.tsx +++ b/src/components/input.tsx @@ -16,6 +16,10 @@ export const Input = ({ clearHistory, }) => { const onSubmit = async (event: React.KeyboardEvent) => { + if (event.isComposing) { + return; + } + const commands: [string] = history .map(({ command }) => command) .filter((command: string) => command);