diff --git a/CHANGELOG.md b/CHANGELOG.md index e8eca226..69079006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,4 +69,7 @@ * Support the use of custom icon size in toolbar. ## [0.2.5] -* Toggle text/background color button in toolbar. \ No newline at end of file +* Toggle text/background color button in toolbar. + +## [0.2.6] +* Fix cursor after pasting. \ No newline at end of file diff --git a/lib/widgets/raw_editor.dart b/lib/widgets/raw_editor.dart index 846bd91d..3ff24e55 100644 --- a/lib/widgets/raw_editor.dart +++ b/lib/widgets/raw_editor.dart @@ -1028,6 +1028,11 @@ class RawEditorState extends EditorState data.text, value.selection, ); + // move cursor to the end of pasted text selection + widget.controller.updateSelection( + TextSelection.collapsed( + offset: value.selection.start + data.text.length), + ChangeSource.LOCAL); } } } diff --git a/pubspec.yaml b/pubspec.yaml index a06e89b5..ceebb07a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_quill description: One client and affiliated collaborator of Flutter Quill is Bullet Journal App. -version: 0.2.5 +version: 0.2.6 #author: bulletjournal homepage: https://bulletjournal.us/home/index.html repository: https://github.com/singerdmx/flutter-quill.git