You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
V2 regression: Enter during CJK IME composition submits in review panel #35746
When using a CJK IME in OpenCode v1.17.14, pressing Enter to confirm an IME candidate is treated as a submit action in the V2 review panel.
This looks like a regression of the IME handling issue reported before in #16360.
Expected: Enter during IME composition should only confirm the IME candidate and keep the review panel input open.
Actual: the review panel input is submitted immediately.
This may need the same kind of guard as before: ignore submit handling when event.isComposing is true, and possibly also handle the Safari legacy case event.keyCode === 229.
I hit the same thing in Safari with the web app prompt input (packages/app/src/components/prompt-input.tsx), and the existing isImeComposing guard can't catch it there because of Safari's event order:
Chrome: keydown(Enter, isComposing=true, keyCode=229) -> compositionend guard works
Safari: compositionend -> keydown(Enter, isComposing=false, keyCode=13) all three conditions fail
Safari fires compositionendbefore the confirming Enter keydown, so checking event.isComposing / keyCode === 229 alone isn't enough there — the guard also needs a short time window after compositionend (comparing event.timeStamp, which shares the same time origin as keydown).
Safari has a second related problem where the composition itself gets aborted mid-input; I filed that separately as #38674.
I'd like to work on this. Plan: add the timeStamp-based guard to the app prompt input, and for the v2 input feed the same logic into the composing flag in interaction.ts so machine.ts stays a pure state machine.
Environment: macOS Safari, Japanese IME and Chinese pinyin.
Activity
powoct commentedon Jul 24, 2026
I hit the same thing in Safari with the web app prompt input (
packages/app/src/components/prompt-input.tsx), and the existingisImeComposingguard can't catch it there because of Safari's event order:Safari fires
compositionendbefore the confirming Enterkeydown, so checkingevent.isComposing/keyCode === 229alone isn't enough there — the guard also needs a short time window aftercompositionend(comparingevent.timeStamp, which shares the same time origin askeydown).Safari has a second related problem where the composition itself gets aborted mid-input; I filed that separately as #38674.
I'd like to work on this. Plan: add the timeStamp-based guard to the app prompt input, and for the v2 input feed the same logic into the
composingflag ininteraction.tssomachine.tsstays a pure state machine.Environment: macOS Safari, Japanese IME and Chinese pinyin.
github-actions commentedon Sep 24, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.