Skip to content

Commit

Permalink
Regression: Unsaved comment reply lost when changing editors (#213805)
Browse files Browse the repository at this point in the history
Fixes #213144
  • Loading branch information
alexr00 authored May 29, 2024
1 parent ef74999 commit 6c907b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/vs/workbench/contrib/comments/browser/commentReply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ export class CommentReply<T extends IRange | ICellRange> extends Disposable {
this.setCommentEditorDecorations();

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

0 comments on commit 6c907b5

Please sign in to comment.