|
|
@ -411,11 +411,11 @@ class RawEditorState extends EditorState |
|
|
|
void _handleCheckboxTap(int offset, bool value) { |
|
|
|
void _handleCheckboxTap(int offset, bool value) { |
|
|
|
if (!widget.readOnly) { |
|
|
|
if (!widget.readOnly) { |
|
|
|
_disableScrollControllerAnimateOnce = true; |
|
|
|
_disableScrollControllerAnimateOnce = true; |
|
|
|
controller.ignoreFocusOnTextChange = true; |
|
|
|
|
|
|
|
final currentSelection = controller.selection.copyWith(); |
|
|
|
final currentSelection = controller.selection.copyWith(); |
|
|
|
final attribute = value ? Attribute.checked : Attribute.unchecked; |
|
|
|
final attribute = value ? Attribute.checked : Attribute.unchecked; |
|
|
|
|
|
|
|
|
|
|
|
controller |
|
|
|
controller |
|
|
|
|
|
|
|
..ignoreFocusOnTextChange = true |
|
|
|
..formatText(offset, 0, attribute) |
|
|
|
..formatText(offset, 0, attribute) |
|
|
|
|
|
|
|
|
|
|
|
// Checkbox tapping causes controller.selection to go to offset 0 |
|
|
|
// Checkbox tapping causes controller.selection to go to offset 0 |
|
|
|