Skip to content

Commit f4d2d42

Browse files
committed
Fix QuillToolbarToggleStyleButton Switching failure
1 parent 308a2ff commit f4d2d42

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/src/controller/quill_controller.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,7 @@ class QuillController extends ChangeNotifier {
375375
Attribute? attribute, {
376376
bool shouldNotifyListeners = true,
377377
}) {
378-
if (len == 0 &&
379-
attribute!.isInline &&
380-
attribute.key != Attribute.link.key) {
378+
if (len == 0 && attribute!.key != Attribute.link.key) {
381379
// Add the attribute to our toggledStyle.
382380
// It will be used later upon insertion.
383381
toggledStyle = toggledStyle.put(attribute);
@@ -603,7 +601,7 @@ class QuillController extends ChangeNotifier {
603601
return false;
604602
}
605603

606-
/// Internal method to allow unit testing
604+
@visibleForTesting
607605
bool pasteUsingPlainOrDelta(String? clipboardText) {
608606
if (clipboardText != null) {
609607
/// Internal copy-paste preserves styles and embeds

0 commit comments

Comments
 (0)