From 04e14c6bbae19255ccb2ff33496aa4394d87bf67 Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" Date: Mon, 28 Nov 2022 16:22:10 +0800 Subject: [PATCH] fix: transparent color should be treated as a highlight color --- .../appflowy_editor/lib/src/render/toolbar/toolbar_item.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart index 5ab7f6cc50..b6051f4877 100644 --- a/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart +++ b/frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart @@ -255,7 +255,9 @@ List defaultToolbarItems = [ highlightCallback: (editorState) => _allSatisfy( editorState, BuiltInAttributeKey.backgroundColor, - (value) => value != null, + (value) { + return value != null && value != '0x00000000'; // transparent color; + }, ), handler: (editorState, context) => formatHighlight( editorState,