From 6e0e49bdd7bc10fc229e1eccca8c3e224c501f1c Mon Sep 17 00:00:00 2001 From: AtlasAutocode <165201146+AtlasAutocode@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:22:56 -0600 Subject: [PATCH] Fix: QuillToolbarToggleStyleButton Switching failure (#2234) --- lib/src/controller/quill_controller.dart | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/src/controller/quill_controller.dart b/lib/src/controller/quill_controller.dart index ed8695784..2a688780d 100644 --- a/lib/src/controller/quill_controller.dart +++ b/lib/src/controller/quill_controller.dart @@ -375,9 +375,7 @@ class QuillController extends ChangeNotifier { Attribute? attribute, { bool shouldNotifyListeners = true, }) { - if (len == 0 && - attribute!.isInline && - attribute.key != Attribute.link.key) { + if (len == 0 && attribute!.key != Attribute.link.key) { // Add the attribute to our toggledStyle. // It will be used later upon insertion. toggledStyle = toggledStyle.put(attribute); @@ -603,7 +601,7 @@ class QuillController extends ChangeNotifier { return false; } - /// Internal method to allow unit testing + @visibleForTesting bool pasteUsingPlainOrDelta(String? clipboardText) { if (clipboardText != null) { /// Internal copy-paste preserves styles and embeds