提交 fe86e99a 编写于 作者: R rebornix

Fix #92793.

上级 831fe1f6
......@@ -496,7 +496,7 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
// If there are no existing comments, place focus on the text area. This must be done after show, which also moves focus.
// if this._commentThread.comments is undefined, it doesn't finish initialization yet, so we don't focus the editor immediately.
if (this._commentThread.comments && !this._commentThread.comments.length) {
if (!this._commentThread.comments || !this._commentThread.comments.length) {
this._commentEditor.focus();
} else if (this._commentEditor.getModel()!.getValueLength() > 0) {
this.expandReplyArea();
......@@ -734,6 +734,10 @@ export class ReviewZoneWidget extends ZoneWidget implements ICommentThreadWidget
this._viewZone.afterLineNumber = currentPosition.lineNumber;
}
if (!this._commentThread.comments || !this._commentThread.comments.length) {
this._commentEditor.focus();
}
this._relayout(computedLinesNumber);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册