Merge pull request #16619 from ShirasawaSama/patch-4

fix: fix the Enter issue of Chinese input (fix #16615)
This commit is contained in:
Tim Jaeryang Baek 2025-08-14 17:03:09 +04:00 committed by GitHub
commit 43234c3c4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1130,7 +1130,7 @@
return res;
}}
oncompositionstart={() => (isComposing = true)}
oncompositionend={() => (isComposing = false)}
oncompositionend={() => setTimeout(() => (isComposing = false))}
on:keydown={async (e) => {
e = e.detail.event;
@ -1341,7 +1341,7 @@
command = getCommand();
}}
on:compositionstart={() => (isComposing = true)}
on:compositionend={() => (isComposing = false)}
on:compositionend={() => setTimeout(() => (isComposing = false))}
on:keydown={async (e) => {
const isCtrlPressed = e.ctrlKey || e.metaKey; // metaKey is for Cmd key on Mac