From 7a967720b9f002333f4185f4f0b7da31aedff818 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 5 Nov 2022 09:02:17 +0100 Subject: [PATCH] neon: Fix cursor being reset when note is updated --- packages/neon/lib/src/apps/notes/pages/note.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/neon/lib/src/apps/notes/pages/note.dart b/packages/neon/lib/src/apps/notes/pages/note.dart index 58d50490..5b0b283b 100644 --- a/packages/neon/lib/src/apps/notes/pages/note.dart +++ b/packages/neon/lib/src/apps/notes/pages/note.dart @@ -54,7 +54,10 @@ class _NotesNotePageState extends State { }); widget.bloc.content.listen((final content) { - _contentController.text = content; + final selection = _contentController.selection; + _contentController + ..text = content + ..selection = selection; }); widget.bloc.title.listen((final title) {