Skip to content

The open source coding agent.

TypeScript

fix(app): fix issue with scroll jumping when pressing escape in comment text area (#15374)

Yihui Khuu34328828ae9d
diff --git a/packages/ui/src/components/line-comment.tsx b/packages/ui/src/components/line-comment.tsx
index 73d83f7d72c..ff5d1df007a 100644
--- a/packages/ui/src/components/line-comment.tsx
+++ b/packages/ui/src/components/line-comment.tsx
@@ -244,6 +244,7 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => {
event.stopPropagation()
if (e.key === "Escape") {
event.preventDefault()
+ e.currentTarget.blur()
split.onCancel()
return
}