Skip to content

Commit

Permalink
Add _throwawayFocusNode to allow continuous mode to work after dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
hunteraraujo committed Sep 29, 2023
1 parent d91236d commit cbdb6ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/lib/views/chat/chat_input_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class _ChatInputFieldState extends State<ChatInputField> {
// Controller for the TextField to manage its content
final TextEditingController _controller = TextEditingController();
final FocusNode _focusNode = FocusNode();
final FocusNode _throwawayFocusNode = FocusNode();

@override
void initState() {
Expand All @@ -44,7 +45,7 @@ class _ChatInputFieldState extends State<ChatInputField> {
final prefs = await SharedPreferences.getInstance();
final showContinuousModeDialog =
prefs.getBool('showContinuousModeDialog') ?? true;

FocusScope.of(context).requestFocus(_throwawayFocusNode);
if (showContinuousModeDialog) {
showDialog(
context: context,
Expand Down

0 comments on commit cbdb6ac

Please sign in to comment.