From 98436b74a0db72abc683e0f35799acbbba9874ab Mon Sep 17 00:00:00 2001 From: artus9033 Date: Thu, 21 Dec 2023 00:28:10 +0100 Subject: [PATCH] Added explanatory commit to ComposerWithSuggestions.js --- .../ComposerWithSuggestions/ComposerWithSuggestions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.js b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.js index 097a2fff8b28..24c4948598af 100644 --- a/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.js +++ b/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.js @@ -382,6 +382,7 @@ function ComposerWithSuggestions({ const positionSnapshot = syncSelectionWithOnChangeTextRef.current.position; syncSelectionWithOnChangeTextRef.current = null; + // ensure that selection is set imperatively after all state changes are effective InteractionManager.runAfterInteractions(() => { // note: this implementation is only available on non-web RN, thus the wrapping // 'if' block contains a redundant (since the ref is only used on iOS) platform check