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 adbf040ac..f2e8d8d4b 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 @@ -1,5 +1,4 @@ import 'package:appflowy_editor/appflowy_editor.dart'; -import 'package:appflowy_editor/src/editor/block_component/base_component/widget/nested_list_widget.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -92,27 +91,26 @@ class _TextBlockComponentWidgetState extends State @override Widget build(BuildContext context) { return node.children.isEmpty - ? buildBulletListBlockComponent(context) - : buildBulletListBlockComponentWithChildren(context); + ? buildParagraphBlockComponent(context) + : buildParagraphBlockComponentWithChildren(context); } - Widget buildBulletListBlockComponentWithChildren(BuildContext context) { + Widget buildParagraphBlockComponentWithChildren(BuildContext context) { return Container( - color: backgroundColor.withOpacity(0.5), + color: backgroundColor, child: NestedListWidget( children: editorState.renderer.buildList( context, widget.node.children, ), - child: buildBulletListBlockComponent(context), + child: buildParagraphBlockComponent(context), ), ); } - Widget buildBulletListBlockComponent(BuildContext context) { + Widget buildParagraphBlockComponent(BuildContext context) { return Container( - color: node.children.isEmpty ? backgroundColor : null, - // padding: padding, + color: backgroundColor, child: FlowyRichText( key: forwardKey, node: widget.node, diff --git a/lib/src/editor_state.dart b/lib/src/editor_state.dart index 2eea003cd..6583746c5 100644 --- a/lib/src/editor_state.dart +++ b/lib/src/editor_state.dart @@ -215,6 +215,7 @@ class EditorState { if (withUpdateSelection) { _selectionUpdateReason = SelectionUpdateReason.transaction; selection = transaction.afterSelection; + _selectionUpdateReason = SelectionUpdateReason.uiEvent; // if the selection is not changed, we still need to notify the listeners. selectionNotifier.notifyListeners(); }