From cd8a6c379b7adbd751c7b99fbeb8d7a94e62896a Mon Sep 17 00:00:00 2001 From: ice-ajax <190340101+ice-ajax@users.noreply.github.com> Date: Tue, 31 Dec 2024 15:03:46 +0100 Subject: [PATCH] fix: replace unique key with global key to avoid losing focus on post details reply bottom textfield (#492) ## Description ## Additional Notes ## Type of Change - [x] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Refactoring - [ ] Documentation - [ ] Chore ## Screenshots (if applicable) --- .../views/components/reply_input_field/reply_input_field.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app/features/feed/create_post/views/components/reply_input_field/reply_input_field.dart b/lib/app/features/feed/create_post/views/components/reply_input_field/reply_input_field.dart index 21d63467e..32e7438c4 100644 --- a/lib/app/features/feed/create_post/views/components/reply_input_field/reply_input_field.dart +++ b/lib/app/features/feed/create_post/views/components/reply_input_field/reply_input_field.dart @@ -36,7 +36,7 @@ class ReplyInputField extends HookConsumerWidget { Widget build(BuildContext context, WidgetRef ref) { final textEditorController = useQuillController(); - final inputContainerKey = useRef(UniqueKey()); + final inputContainerKey = useRef(GlobalKey()); final focusNode = useFocusNode(); final hasFocus = useNodeFocused(focusNode); final attachedMediaNotifier = useState([]);