singerdmx / flutter-quill

Rich text editor for Flutter
https://pub.dev/packages/flutter_quill
MIT License
2.55k stars 821 forks source link

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

Open VenusCao opened 10 months ago

VenusCao commented 10 months ago

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 ```dart 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 ```console [Paste your logs here] ```
singerdmx commented 10 months ago

Hello there, on behalf the Flutter Quill Team I would like to thank you for opening your first issue. Your inputs and insights are valuable in shaping a stable and reliable version for all our users. Thank you for being part of the open-source community!