flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

When the QuillBaseToolbar is only displayed when the keyboard pops up, there is a bug in the FocusNode of QuillEditor

Open VenusCao opened this issue 7 months ago • 1 comments

Is there an existing issue for this?

Flutter Quill version

8.6.1

Other Flutter Quill packages versions

No response

Steps to reproduce

Offstage(
              offstage: MediaQuery.of(context).viewInsets.bottom==0,
              child:QuillBaseToolba(...))

Expected results

~

Actual results

The first time you click on the editor, the cursor will appear. After the keyboard pops up, the cursor will not be visible, and you cannot close the keyboard at this time. Only by clicking on the editor again will the cursor be displayed, and the keyboard can close normally

Code sample

Code sample
QuillProvider(
        configurations: QuillConfigurations(
          controller: _controller,
        ),
        child: Column(
          children: [
            // const QuillToolbar(),
            Expanded(
              child: Container(
                color: Colors.grey.withOpacity(0.2),
                child: QuillEditor.basic(
                  configurations: QuillEditorConfigurations(
                      readOnly: false, autoFocus: true),
                ),
              ),
            ),

            Container(
              color: Colors.grey.withOpacity(0.5),
              width: double.infinity,
              child: QuillBaseToolbar(
                configurations: QuillBaseToolbarConfigurations(
                    color: Colors.grey.withOpacity(0.5),
                    childrenBuilder: (c) {
                      return [
                        QuillToolbarToggleStyleButton(
                          attribute: Attribute.bold,
                          controller: _controller,
                          options: QuillToolbarToggleStyleButtonOptions(
                              childBuilder: (options, extraOptions) {
                            return IconButton(
                                onPressed: () {
                                  extraOptions.onPressed?.call();
                                },
                                icon: Icon(
                                  Icons.format_bold,
                                  color: extraOptions.isToggled
                                      ? Colors.blue
                                      : Colors.black,
                                ));
                          }),
                        ),
                      ];
                    }),
              ),
            )
          ],
        ),
      )

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

VenusCao avatar Nov 20 '23 16:11 VenusCao