Skip to content

Commit

Permalink
Merge pull request #15482 from aneequeahmad/edit-composer-highlight-fix
Browse files Browse the repository at this point in the history
Fix edit message highlight issue
  • Loading branch information
chiragsalian authored Mar 6, 2023
2 parents 2eedb31 + 9fafefa commit 2c23614
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemMessageEdit.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ class ReportActionItemMessageEdit extends React.Component {
toggleReportActionComposeView(false, this.props.isSmallScreenWidth);
}}
onBlur={(event) => {
this.setState({isFocused: false});
const relatedTargetId = lodashGet(event, 'nativeEvent.relatedTarget.id');

// Return to prevent re-render when save/cancel button is pressed which cancels the onPress event by re-rendering
if (_.contains([this.saveButtonID, this.cancelButtonID, this.emojiButtonID], relatedTargetId)) {
return;
}
this.setState({isFocused: false});

if (this.messageEditInput === relatedTargetId) {
return;
Expand Down

0 comments on commit 2c23614

Please sign in to comment.