From 369adc83d7964d4b59816c5b41d5b3f8f7522ec5 Mon Sep 17 00:00:00 2001 From: Mohsen Date: Tue, 19 Sep 2023 09:11:33 +0300 Subject: [PATCH] [#17309] fix: wrong cursor position in a pre-filled composer --- src/status_im2/contexts/chat/composer/effects.cljs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/status_im2/contexts/chat/composer/effects.cljs b/src/status_im2/contexts/chat/composer/effects.cljs index 13050f69ce86..26d1fcd9c258 100644 --- a/src/status_im2/contexts/chat/composer/effects.cljs +++ b/src/status_im2/contexts/chat/composer/effects.cljs @@ -89,7 +89,6 @@ (rn/use-effect (fn [] (maximized-effect state animations dimensions chat-input) - (reenter-screen-effect state dimensions chat-input) (layout-effect state) (kb-default-height-effect state) (background-effect state animations dimensions chat-input) @@ -98,7 +97,11 @@ (empty-effect state animations subscriptions) (kb/add-kb-listeners props state animations dimensions) #(component-will-unmount props)) - [max-height])) + [max-height]) + (rn/use-effect + (fn [] + (reenter-screen-effect state dimensions subscriptions)) + [max-height subscriptions])) (defn use-edit [{:keys [input-ref]}