Fix bug with keepStyleOnNewLine for link

pull/1374/head
EgorK0rshun 2 years ago
parent 2045d45e88
commit 1fc32244dc
  1. 3
      CHANGELOG.md
  2. 4
      lib/src/widgets/controller.dart

@ -1,3 +1,6 @@
# [7.4.2]
- Fix bug with keepStyleOnNewLine for link.
# [7.4.1]
- Fix toolbar dividers condition.

@ -400,7 +400,9 @@ class QuillController extends ChangeNotifier {
extentOffset: math.min(selection.extentOffset, end));
if (_keepStyleOnNewLine) {
final style = getSelectionStyle();
final notInlineStyle = style.attributes.values.where((s) => !s.isInline);
final notInlineStyle = style.attributes.values.where(
(s) => !s.isInline || s.key == Attribute.link.key,
);
toggledStyle = style.removeAll(notInlineStyle.toSet());
} else {
toggledStyle = Style();

Loading…
Cancel
Save