diff --git a/CHANGELOG.md b/CHANGELOG.md index affde4e1..d5e93d88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## 9.0.2-dev.1 * Add configurations for the new dropdown `QuillToolbarSelectHeaderStyleButton`, you can use the orignal one or this +* Fix the [issue](https://github.com/singerdmx/flutter-quill/issues/1119) when enter is pressed, all font settings is lost ## 9.0.2-dev * **Breaking change** Remove the spacer widget, removed the controller option for each button diff --git a/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart b/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart index 267f6d57..9b1ca750 100644 --- a/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart +++ b/lib/src/widgets/raw_editor/raw_editor_state_text_input_client_mixin.dart @@ -219,7 +219,7 @@ mixin RawEditorStateTextInputClientMixin on EditorState ); } - // TODO: A bug here too + // TODO: The same bug here if (widget.configurations.controller.selectedFontSize != null) { widget.configurations.controller.formatSelection( @@ -233,6 +233,8 @@ mixin RawEditorStateTextInputClientMixin on EditorState ); } + // TODO: The same bug here + widget.configurations.controller.selectedStyles.forEach((key, value) { if (value ?? false) { widget.configurations.controller.formatSelection(key); diff --git a/lib/src/widgets/toolbar/buttons/toggle_style_button.dart b/lib/src/widgets/toolbar/buttons/toggle_style_button.dart index a44d5561..6f7f4305 100644 --- a/lib/src/widgets/toolbar/buttons/toggle_style_button.dart +++ b/lib/src/widgets/toolbar/buttons/toggle_style_button.dart @@ -227,7 +227,7 @@ class QuillToolbarToggleStyleButtonState ? Attribute.clone(widget.attribute, null) : widget.attribute, ) - ..selectStyle(widget.attribute, _isToggled == true ? true : false); + ..selectStyle(widget.attribute, _isToggled ?? false); } }