diff --git a/CHANGELOG.md b/CHANGELOG.md index c60f2317..f385bfbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# [7.4.3] +- Fixed a space input error on iPad. + +# [7.4.2] +- Fix bug with keepStyleOnNewLine for link. + # [7.4.1] - Fix toolbar dividers condition. diff --git a/lib/src/models/documents/nodes/container.dart b/lib/src/models/documents/nodes/container.dart index f868f43d..306d56bc 100644 --- a/lib/src/models/documents/nodes/container.dart +++ b/lib/src/models/documents/nodes/container.dart @@ -25,7 +25,7 @@ abstract class Container extends Node { int get childCount => _children.length; /// Returns the first child [Node]. - Node get first => _children.first; + Node? get first => isEmpty ? null : _children.first; /// Returns the last child [Node]. Node get last => _children.last; diff --git a/lib/src/widgets/controller.dart b/lib/src/widgets/controller.dart index 16e919e8..b4127ff5 100644 --- a/lib/src/widgets/controller.dart +++ b/lib/src/widgets/controller.dart @@ -400,8 +400,10 @@ class QuillController extends ChangeNotifier { extentOffset: math.min(selection.extentOffset, end)); if (_keepStyleOnNewLine) { final style = getSelectionStyle(); - final notInlineStyle = style.attributes.values.where((s) => !s.isInline); - toggledStyle = style.removeAll(notInlineStyle.toSet()); + final ignoredStyles = style.attributes.values.where( + (s) => !s.isInline || s.key == Attribute.link.key, + ); + toggledStyle = style.removeAll(ignoredStyles.toSet()); } else { toggledStyle = Style(); } diff --git a/pubspec.yaml b/pubspec.yaml index 9fda30c1..f304237f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter. -version: 7.4.1 +version: 7.4.3 homepage: https://1o24bbs.com/c/bulletjournal/108 repository: https://github.com/singerdmx/flutter-quill