Skip to content

Commit 6c907b5

Browse files
authored
Regression: Unsaved comment reply lost when changing editors (#213805)
Fixes #213144
1 parent ef74999 commit 6c907b5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/vs/workbench/contrib/comments/browser/commentReply.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,11 @@ export class CommentReply<T extends IRange | ICellRange> extends Disposable {
117117
this.setCommentEditorDecorations();
118118

119119
// Only add the additional step of clicking a reply button to expand the textarea when there are existing comments
120-
if (hasExistingComments) {
120+
if (this._pendingComment) {
121+
this.expandReplyArea();
122+
} else if (hasExistingComments) {
121123
this.createReplyButton(this.commentEditor, this.form);
122-
} else if (focus && ((this._commentThread.comments && this._commentThread.comments.length === 0) || this._pendingComment)) {
124+
} else if (focus && (this._commentThread.comments && this._commentThread.comments.length === 0)) {
123125
this.expandReplyArea();
124126
}
125127
this._error = dom.append(this.form, dom.$('.validation-error.hidden'));

0 commit comments

Comments
 (0)