diff --git a/lib/src/editor/block_component/text_block_component/text_block_component.dart b/lib/src/editor/block_component/text_block_component/text_block_component.dart index 5ac1bb2bf..efe63b768 100644 --- a/lib/src/editor/block_component/text_block_component/text_block_component.dart +++ b/lib/src/editor/block_component/text_block_component/text_block_component.dart @@ -117,11 +117,12 @@ class _TextBlockComponentWidgetState extends State } void _onSelectionChange() { - setState(() { - final selection = editorState.selection; - _showPlaceholder = selection != null && - (selection.isSingle && selection.start.path.equals(node.path)); - }); + final selection = editorState.selection; + final showPlaceholder = selection != null && + (selection.isSingle && selection.start.path.equals(node.path)); + if (showPlaceholder != _showPlaceholder) { + setState(() => _showPlaceholder = showPlaceholder); + } } @override