提交 af9d9ac5 编写于 作者: R Rachel Macfarlane

Preserve focus on comments panel when selecting comments, fixes...

Preserve focus on comments panel when selecting comments, fixes https://github.com/Microsoft/vscode-pull-request-github/issues/198
上级 334c4051
...@@ -175,8 +175,6 @@ export class ReviewZoneWidget extends ZoneWidget { ...@@ -175,8 +175,6 @@ export class ReviewZoneWidget extends ZoneWidget {
this.show({ lineNumber: this._commentThread.range.startLineNumber, column: 1 }, 2); this.show({ lineNumber: this._commentThread.range.startLineNumber, column: 1 }, 2);
} }
this._bodyElement.focus();
if (commentId) { if (commentId) {
let height = this.editor.getLayoutInfo().height; let height = this.editor.getLayoutInfo().height;
let matchedNode = this._commentElements.filter(commentNode => commentNode.comment.commentId === commentId); let matchedNode = this._commentElements.filter(commentNode => commentNode.comment.commentId === commentId);
...@@ -185,7 +183,6 @@ export class ReviewZoneWidget extends ZoneWidget { ...@@ -185,7 +183,6 @@ export class ReviewZoneWidget extends ZoneWidget {
const commentCoords = dom.getDomNodePagePosition(matchedNode[0].domNode); const commentCoords = dom.getDomNodePagePosition(matchedNode[0].domNode);
this.editor.setScrollTop(this.editor.getTopForLineNumber(this._commentThread.range.startLineNumber) - height / 2 + commentCoords.top - commentThreadCoords.top); this.editor.setScrollTop(this.editor.getTopForLineNumber(this._commentThread.range.startLineNumber) - height / 2 + commentCoords.top - commentThreadCoords.top);
matchedNode[0].focus();
return; return;
} }
} }
......
...@@ -232,7 +232,6 @@ export class CommentsPanel extends Panel { ...@@ -232,7 +232,6 @@ export class CommentsPanel extends Panel {
const control = editor.getControl(); const control = editor.getControl();
if (threadToReveal && isCodeEditor(control)) { if (threadToReveal && isCodeEditor(control)) {
const controller = ReviewController.get(control); const controller = ReviewController.get(control);
console.log(commentToReveal.command);
controller.revealCommentThread(threadToReveal, commentToReveal.commentId); controller.revealCommentThread(threadToReveal, commentToReveal.commentId);
} }
setCommentsForFile = null; setCommentsForFile = null;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册