diff --git a/src/pages/home/report/ReportActionCompose.js b/src/pages/home/report/ReportActionCompose.js index e6a01ff7a77f..87bfe26fae5a 100644 --- a/src/pages/home/report/ReportActionCompose.js +++ b/src/pages/home/report/ReportActionCompose.js @@ -78,8 +78,11 @@ class ReportActionCompose extends React.Component { this.comment = this.props.comment; } - // When any modal goes from visible to hidden, bring focus to the compose field - if (prevProps.modal.isVisible && !this.props.modal.isVisible) { + // When any modal goes from visible to hidden or when the report ID changes, bring focus to the compose field + if ( + (prevProps.modal.isVisible && !this.props.modal.isVisible) + || (prevProps.reportID !== this.props.reportID) + ) { this.setIsFocused(true); } }