From a4bedf58a55d6222341f4c7810d49b43769e8823 Mon Sep 17 00:00:00 2001 From: X Code Date: Mon, 25 Jul 2022 10:51:53 -0700 Subject: [PATCH] Code refactor --- lib/src/widgets/raw_editor.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/widgets/raw_editor.dart b/lib/src/widgets/raw_editor.dart index 66a362ed..b661e512 100644 --- a/lib/src/widgets/raw_editor.dart +++ b/lib/src/widgets/raw_editor.dart @@ -411,11 +411,11 @@ class RawEditorState extends EditorState void _handleCheckboxTap(int offset, bool value) { if (!widget.readOnly) { _disableScrollControllerAnimateOnce = true; - controller.ignoreFocusOnTextChange = true; final currentSelection = controller.selection.copyWith(); final attribute = value ? Attribute.checked : Attribute.unchecked; controller + ..ignoreFocusOnTextChange = true ..formatText(offset, 0, attribute) // Checkbox tapping causes controller.selection to go to offset 0