From 340c96578804223a7fe000d8c3a7dfbd65ce2aff Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 8 Apr 2021 16:29:01 +0100 Subject: [PATCH] Remove duplicate focusing logic --- .../components/CommentApp/components/Comment/index.tsx | 9 --------- 1 file changed, 9 deletions(-) diff --git a/client/src/components/CommentApp/components/Comment/index.tsx b/client/src/components/CommentApp/components/Comment/index.tsx index 62fdb1d204..901a4c9f0b 100644 --- a/client/src/components/CommentApp/components/Comment/index.tsx +++ b/client/src/components/CommentApp/components/Comment/index.tsx @@ -557,15 +557,6 @@ export default class CommentComponent extends React.Component { const element = ReactDOM.findDOMNode(this); if (element instanceof HTMLElement) { - // If this is a new comment, focus in the edit box - if (this.props.comment.mode === 'creating') { - const textAreaElement = element.querySelector('textarea'); - - if (textAreaElement instanceof HTMLTextAreaElement) { - textAreaElement.focus(); - } - } - this.props.layout.setCommentElement(this.props.comment.localId, element); this.props.layout.setCommentHeight( this.props.comment.localId,