Skip to content

Commit

Permalink
Update selection when toggling checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux committed Dec 19, 2024
1 parent c391628 commit 6a44a5a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/fleather/lib/src/widgets/editable_text_block.dart
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ class EditableTextBlock extends StatelessWidget {
void _toggle(LineNode node, bool checked) {
final attr =
checked ? ParchmentAttribute.checked : ParchmentAttribute.checked.unset;
controller.updateSelection(
TextSelection.collapsed(offset: node.documentOffset),
source: ChangeSource.local);
controller.formatText(node.documentOffset, 0, attr);
}
}
Expand Down

0 comments on commit 6a44a5a

Please sign in to comment.