From 31e8198606de11b3c7e796d061e8c15cef93ef3b Mon Sep 17 00:00:00 2001 From: zhaoce Date: Sat, 22 May 2021 01:02:32 +0900 Subject: [PATCH] bugfix: can't drag select text (#232) --- lib/widgets/raw_editor.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/widgets/raw_editor.dart b/lib/widgets/raw_editor.dart index 0497a04d..022a140d 100644 --- a/lib/widgets/raw_editor.dart +++ b/lib/widgets/raw_editor.dart @@ -490,7 +490,13 @@ class RawEditorState extends EditorState } @override - void bringIntoView(TextPosition position) {} + void bringIntoView(TextPosition position) { + setState(() { + widget.controller.selection = TextSelection( + baseOffset: widget.controller.selection.baseOffset, + extentOffset: position.offset); + }); + } @override void connectionClosed() {