Explorar o código

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

Yihui Khuu hai 6 meses
pai
achega
34328828ae
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

@@ -244,6 +244,7 @@ export const LineCommentEditor = (props: LineCommentEditorProps) => {
             event.stopPropagation()
             event.stopPropagation()
             if (e.key === "Escape") {
             if (e.key === "Escape") {
               event.preventDefault()
               event.preventDefault()
+              e.currentTarget.blur()
               split.onCancel()
               split.onCancel()
               return
               return
             }
             }