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
LineCommentEditor submits comment when pressing Enter to confirm IME composition #16360
When using a CJK (Chinese/Japanese/Korean) IME in the browser version of OpenCode, pressing Enter to confirm an IME candidate selection in the LineCommentEditor textarea unintentionally submits the comment.
The root cause is that the on:keydown handler in LineCommentEditor did not check event.isComposing (or the legacy event.keyCode === 229 for Safari), so the Enter key fired during IME composition was treated as a submit action.
Reproduced in: Safari and Chrome.
Plugins
No response
OpenCode version
1.2.20
Steps to reproduce
Open OpenCode in a browser
Open a comment editor
Enable a CJK input method
Click into the LineCommentEditor textarea
Start typing characters — IME composition begins (underline appears)
Press Enter to confirm the IME candidate
Expected: the composed character is committed to the textarea, composition ends
Actual: the comment is submitted immediately
Activity