mirror of
https://fastgit.cc/https://github.com/anomalyco/opencode
synced 2026-04-21 13:21:17 +08:00
fix(ui): prevent unwanted key events during composition in LineCommentEditor (#16361)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user