Skip to content

Commit

Permalink
Fix: QuillToolbarToggleStyleButton Switching failure (#2234)
Browse files Browse the repository at this point in the history
  • Loading branch information
AtlasAutocode authored Sep 17, 2024
1 parent fd0691e commit 6e0e49b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/src/controller/quill_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 6e0e49b

Please sign in to comment.