Remove duplicate focusing logic

pull/6978/head
Karl Hobley 2021-04-08 16:29:01 +01:00
rodzic 375e2768be
commit 340c965788
1 zmienionych plików z 0 dodań i 9 usunięć

Wyświetl plik

@ -557,15 +557,6 @@ export default class CommentComponent extends React.Component<CommentProps> {
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,