Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to type in quill field in release mode #1899

Closed
1 task done
Prajit7 opened this issue May 28, 2024 · 3 comments
Closed
1 task done

Unable to type in quill field in release mode #1899

Prajit7 opened this issue May 28, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Prajit7
Copy link

Prajit7 commented May 28, 2024

Is there an existing issue for this?

Flutter Quill version

No response

Steps to reproduce

QuillProvider(
configurations: QuillConfigurations(
controller: quillController,
),
child: QuillEditor(
focusNode: _focusNode,
scrollController: bodyScrollController,
configurations: QuillEditorConfigurations(
showCursor: true,
textSelectionThemeData: TextSelectionThemeData(
selectionColor: Colors.blue.withOpacity(0.2),
),

                  autoFocus: false,
                  expands: false,
                  padding: const EdgeInsets.all(16),
                  scrollable: true,
                  minHeight: MediaQuery.of(context).size.height - 250,
                  textInputAction: TextInputAction.newline,
                  placeholder: "Add Message",
                  customStyles: const DefaultStyles(
                    placeHolder: DefaultTextBlockStyle(
                      TextStyle(
                        fontSize: 18,
                        color: Colors.grey,
                      ),
                      VerticalSpacing(0, 0),
                      VerticalSpacing(0, 0),
                      BoxDecoration(),
                    ),
                  ),
                ),
              ),
            ),

When we move from normal textfield to quill-field, the cursor and keyboard appears but unable to type anything.

flutter_quill.mp4

Expected results

After moving from normal text-field the quill-field should work.

Actual results

When we move from normal textfield to quill-field, the cursor and keyboard appears but unable to type anything.

Code sample

QuillProvider(
configurations: QuillConfigurations(
controller: quillController,
),
child: QuillEditor(
focusNode: _focusNode,
scrollController: bodyScrollController,
configurations: QuillEditorConfigurations(
showCursor: true,
textSelectionThemeData: TextSelectionThemeData(
selectionColor: Colors.blue.withOpacity(0.2),
),

                  autoFocus: false,
                  expands: false,
                  padding: const EdgeInsets.all(16),
                  scrollable: true,
                  minHeight: MediaQuery.of(context).size.height - 250,
                  textInputAction: TextInputAction.newline,
                  placeholder: "Add Message",
                  customStyles: const DefaultStyles(
                    placeHolder: DefaultTextBlockStyle(
                      TextStyle(
                        fontSize: 18,
                        color: Colors.grey,
                      ),
                      VerticalSpacing(0, 0),
                      VerticalSpacing(0, 0),
                      BoxDecoration(),
                    ),
                  ),
                ),
              ),
            ),

Screenshots or Video

flutter_quill.mp4

Logs

After adding the below code for QuillProvider, the keyboard works fine but cursor is not coming with some exception.

onTapDown: (details, p1) {

                        _focusNode.hasFocus ? _focusNode.requestFocus() : null;
                        return true;
                      },

If used the above property the exception is:

   Null check operator used on a null value
I/flutter (11856): [2024-05-28 11:39:49.741400] MyApp: #0      RenderEditor.selectPosition (package:flutter_quill/src/widgets/editor/editor.dart:1024)
I/flutter (11856): [2024-05-28 11:39:49.741937] MyApp: #1      _QuillEditorSelectionGestureDetectorBuilder.onSingleTapUp (package:flutter_quill/src/widgets/editor/editor.dart:545)
I/flutter (11856): [2024-05-28 11:39:49.742209] MyApp: #2      _EditorTextSelectionGestureDetectorState._handleTapUp (package:flutter_quill/src/widgets/text_selection.dart:774)
I/flutter (11856): [2024-05-28 11:39:49.742283] MyApp: #3      TapGestureRecognizer.handleTapUp.<anonymous closure> (package:flutter/src/gestures/tap.dart:649)      
I/flutter (11856): [2024-05-28 11:39:49.742318] MyApp: #4      GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:315)
I/flutter (11856): [2024-05-28 11:39:49.742462] MyApp: #5      TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:649)
I/flutter (11856): [2024-05-28 11:39:49.742795] MyApp: #6      BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:309)
I/flutter (11856): [2024-05-28 11:39:49.742969] MyApp: #7      BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:279)
I/flutter (11856): [2024-05-28 11:39:49.743105] MyApp: #8      GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:167)
I/flutter (11856): [2024-05-28 11:39:49.743186] MyApp: #9      GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:499)
I/flutter (11856): [2024-05-28 11:39:49.743222] MyApp: #10     GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:475)
I/flutter (11856): [2024-05-28 11:39:49.743255] MyApp: #11     RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:430)
I/flutter (11856): [2024-05-28 11:39:49.743516] MyApp: #12     GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:420)
I/flutter (11856): [2024-05-28 11:39:49.743595] MyApp: #13     GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:383)
I/flutter (11856): [2024-05-28 11:39:49.743630] MyApp: #14     GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:330)
I/flutter (11856): [2024-05-28 11:39:49.743681] MyApp: #15     GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:299)
I/flutter (11856): [2024-05-28 11:39:49.743715] MyApp: #19     _invoke1 (dart:ui/hooks.dart:330)
I/flutter (11856): [2024-05-28 11:39:49.743749] MyApp: #20     PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:429)
I/flutter (11856): [2024-05-28 11:39:49.743781] MyApp: #21     _dispatchPointerDataPacket (dart:ui/hooks.dart:262)
@Prajit7 Prajit7 added the bug Something isn't working label May 28, 2024
@Prajit7 Prajit7 changed the title Unable to type in quill field in relase mode Unable to type in quill field in release mode May 28, 2024
@suesitran
Copy link

suesitran commented Jun 26, 2024

I second this. Having the same issue on Android 14 devices too. Simple remedy is that user needs to manually tap on QuillEditor again, if it works, it works, if it fails, tap again.

@AtlasAutocode
Copy link
Collaborator

A recent update to fix scrolling when changing editor controls maybe related to this issue.
Similarly, the simple remedy was to click on the editor.
Can you try the current version and see if this is still an issue?

@CatHood0
Copy link
Collaborator

CatHood0 commented Sep 21, 2024

Since we don't have any response of the OP, i will close this issue. If the issue persists, please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants