Преглед на файлове

fix: transparent color should be treated as a highlight color

Lucas.Xu преди 2 години
родител
ревизия
04e14c6bba
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart

+ 3 - 1
frontend/app_flowy/packages/appflowy_editor/lib/src/render/toolbar/toolbar_item.dart

@@ -255,7 +255,9 @@ List<ToolbarItem> defaultToolbarItems = [
     highlightCallback: (editorState) => _allSatisfy(
       editorState,
       BuiltInAttributeKey.backgroundColor,
-      (value) => value != null,
+      (value) {
+        return value != null && value != '0x00000000'; // transparent color;
+      },
     ),
     handler: (editorState, context) => formatHighlight(
       editorState,