diff --git a/src/pages/home/report/ReportActionItemMessageEdit.js b/src/pages/home/report/ReportActionItemMessageEdit.js index cea8a31b00c2..954af7a8d8a1 100644 --- a/src/pages/home/report/ReportActionItemMessageEdit.js +++ b/src/pages/home/report/ReportActionItemMessageEdit.js @@ -208,12 +208,10 @@ function ReportActionItemMessageEdit(props) { } setDraft((prevDraft) => { if (newDraftInput !== newDraft) { - setSelection(() => { - const remainder = ComposerUtils.getCommonSuffixLength(prevDraft, newDraft); - return { - start: newDraft.length - remainder, - end: newDraft.length - remainder, - }; + const remainder = ComposerUtils.getCommonSuffixLength(prevDraft, newDraft); + setSelection({ + start: newDraft.length - remainder, + end: newDraft.length - remainder, }); } return newDraft;