kopia lustrzana https://github.com/wagtail/wagtail
Remove duplicate focusing logic
rodzic
375e2768be
commit
340c965788
|
@ -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,
|
||||
|
|
Ładowanie…
Reference in New Issue