Explorar o código

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

Hoshiumi Arata hai 6 meses
pai
achega
e9568999c3
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      packages/ui/src/components/line-comment.tsx

+ 1 - 0
packages/ui/src/components/line-comment.tsx

@@ -240,6 +240,7 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => {
           }}
           }}
           on:keydown={(e) => {
           on:keydown={(e) => {
             const event = e as KeyboardEvent
             const event = e as KeyboardEvent
+            if (event.isComposing || event.keyCode === 229) return
             event.stopPropagation()
             event.stopPropagation()
             if (e.key === "Escape") {
             if (e.key === "Escape") {
               event.preventDefault()
               event.preventDefault()