We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c9c93a commit 1e0664aCopy full SHA for 1e0664a
src/status_im2/contexts/chat/composer/effects.cljs
@@ -121,7 +121,12 @@
121
(reset! saved-cursor-position (if (zero? text-value-count)
122
(count edit-text)
123
text-value-count))
124
- (.setNativeProps ^js @input-ref (clj->js {:text edit-text})))]
+ (when @input-ref
125
+ (let [selection-pos (count edit-text)]
126
+ (.setNativeProps ^js @input-ref
127
+ (clj->js {:text edit-text
128
+ :selection {:start selection-pos
129
+ :end selection-pos}})))))]
130
(when (and edit @input-ref)
131
;; NOTE: A small setTimeout is necessary to ensure the focus is enqueued and is executed
132
;; ASAP. Check https://github.com/software-mansion/react-native-screens/issues/472
0 commit comments