Skip to content

Commit

Permalink
fix: replace unique key with global key to avoid losing focus on post…
Browse files Browse the repository at this point in the history
… details reply bottom textfield (#492)

## Description
<!-- Briefly explain the purpose of this PR and what it accomplishes.
-->

## Additional Notes
<!-- Add any extra context or relevant information here. -->

## Type of Change
- [x] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Refactoring
- [ ] Documentation
- [ ] Chore

## Screenshots (if applicable)
<!-- Include screenshots to demonstrate any UI changes. -->
<!-- <img width="180" alt="image" src="image_url_here"> -->
  • Loading branch information
ice-ajax authored Dec 31, 2024
1 parent 1fc4ffd commit cd8a6c3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(<MediaFile>[]);
Expand Down

0 comments on commit cd8a6c3

Please sign in to comment.