From 83020a17fb6e59f4e9dae9be34d459cd6f5011a3 Mon Sep 17 00:00:00 2001 From: Ellet Date: Wed, 13 Dec 2023 09:59:50 +0300 Subject: [PATCH] Update todos --- CHANGELOG.md | 1 + .../raw_editor/raw_editor_state_text_input_client_mixin.dart | 4 +++- lib/src/widgets/toolbar/buttons/toggle_style_button.dart | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) 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); } }