diff --git a/CHANGELOG.md b/CHANGELOG.md index 35a446ef..bd3af0df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ -## [next] - +## [8.0.1] - Fixes a word typo of `mirgration` to `migration` in readme & migration document. +- Updated migration guide ## [8.0.0] - If you have mirgrated recently, don't get scared from this update, it just add a documentation, mirgration guide and mark the version as more stable release, since we did break a lot of breaking changes (at least that what most developers says) we should have change the major version but when we were in the development of this new version, our time was very tight and now we are fixing the version number diff --git a/lib/src/widgets/raw_editor/raw_editor.dart b/lib/src/widgets/raw_editor/raw_editor.dart index c3efe93c..117c6f30 100644 --- a/lib/src/widgets/raw_editor/raw_editor.dart +++ b/lib/src/widgets/raw_editor/raw_editor.dart @@ -65,6 +65,7 @@ class RawEditor extends StatefulWidget { required this.selectionColor, required this.selectionCtrls, required this.embedBuilder, + required this.autoFocus, Key? key, this.scrollable = true, this.padding = EdgeInsets.zero, @@ -82,7 +83,6 @@ class RawEditor extends StatefulWidget { this.customShortcuts, this.customActions, this.expands = false, - this.autoFocus = false, this.enableUnfocusOnTapOutside = true, this.keyboardAppearance = Brightness.light, this.enableInteractiveSelection = true, @@ -1141,15 +1141,14 @@ class RawEditorState extends EditorState _styles = _styles!.merge(widget.customStyles!); } - // TODO: this might need some attention - _requestFocusIfShould(); + _requestAutoFocusIfShould(); } - Future _requestFocusIfShould() async { + Future _requestAutoFocusIfShould() async { if (!_didAutoFocus && widget.autoFocus) { - _didAutoFocus = true; - await Future.delayed(Duration.zero); + await Future.delayed(Duration.zero); // To avoid exceptions FocusScope.of(context).autofocus(widget.focusNode); + _didAutoFocus = true; } } diff --git a/pubspec.yaml b/pubspec.yaml index f7885b20..697c3d17 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter. -version: 8.0.0 +version: 8.0.1 homepage: https://1o24bbs.com/c/bulletjournal/108 repository: https://github.com/singerdmx/flutter-quill topics: