diff --git a/core/comments/comment_editor.ts b/core/comments/comment_editor.ts index 9a1907e91..69dadd884 100644 --- a/core/comments/comment_editor.ts +++ b/core/comments/comment_editor.ts @@ -52,6 +52,7 @@ export class CommentEditor implements IFocusableNode { dom.HTML_NS, 'textarea', ) as HTMLTextAreaElement; + this.textArea.setAttribute('tabindex', '-1'); dom.addClass(this.textArea, 'blocklyCommentText'); dom.addClass(this.textArea, 'blocklyTextarea'); dom.addClass(this.textArea, 'blocklyText'); diff --git a/core/keyboard_nav/line_cursor.ts b/core/keyboard_nav/line_cursor.ts index aeb80cff1..a301c3b37 100644 --- a/core/keyboard_nav/line_cursor.ts +++ b/core/keyboard_nav/line_cursor.ts @@ -401,6 +401,8 @@ export class LineCursor extends Marker { block.workspace.scrollBoundsIntoView( block.getBoundingRectangleWithoutChildren(), ); + } else if (newNode instanceof RenderedWorkspaceComment) { + newNode.workspace.scrollBoundsIntoView(newNode.getBoundingRectangle()); } }