فهرست منبع

fix(session-ui): deselect review line on draft cancel (#34585)

Co-authored-by: 𝓛𝓲𝓽𝓽𝓵𝓮 𝓕𝓻𝓪𝓷𝓴 <little-frank@opencord.local>
opencode-agent[bot] 3 ماه پیش
والد
کامیت
90f0576222
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      packages/session-ui/src/components/line-comment-annotations.tsx

+ 4 - 1
packages/session-ui/src/components/line-comment-annotations.tsx

@@ -408,7 +408,10 @@ export function createLineCommentController<T extends LineCommentShape>(
       selection: formatSelectedLineLabel(range, i18n.t),
       selection: formatSelectedLineLabel(range, i18n.t),
       mention: props.mention,
       mention: props.mention,
       onInput: note.setDraft,
       onInput: note.setDraft,
-      onCancel: note.cancelDraft,
+      onCancel: () => {
+        note.cancelDraft()
+        note.select(null)
+      },
       onSubmit: (comment) => {
       onSubmit: (comment) => {
         props.onSubmit({ comment, selection: cloneSelectedLineRange(range) })
         props.onSubmit({ comment, selection: cloneSelectedLineRange(range) })
         note.cancelDraft()
         note.cancelDraft()