Skip to content

The open source coding agent.

TypeScript

fix(ui): prevent unwanted key events during composition in LineCommentEditor (#16361)

Hoshiumi Aratae9568999c385
diff --git a/packages/ui/src/components/line-comment.tsx b/packages/ui/src/components/line-comment.tsx
index 6a247990b38..73d83f7d72c 100644
--- a/packages/ui/src/components/line-comment.tsx
+++ b/packages/ui/src/components/line-comment.tsx
@@ -240,6 +240,7 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => {
}}
on:keydown={(e) => {
const event = e as KeyboardEvent
+ if (event.isComposing || event.keyCode === 229) return
event.stopPropagation()
if (e.key === "Escape") {
event.preventDefault()