From b235af057b285bd87264869e6c2afefe8abc2064 Mon Sep 17 00:00:00 2001 From: lucaslushuo <282139159+lucaslus@users.noreply.github.com> Date: Tue, 8 Sep 2026 15:07:32 +0800 Subject: [PATCH 1/2] fix(editor): restore empty-body caret and align task checkboxes Keep the native macOS caret visible before any body text is entered by removing forced compositing from the root, panel, and editor scroll layer. Restore text selection and explicit caret color inside the editor, and focus the ProseMirror view before creating a scroll transaction to avoid WebKit dispatching against a stale document. Set taskItem data attributes on Tiptap node views so checklist layout and checkbox styles apply in edit mode. Align checkboxes with the first text line, retain indentation for wrapped and nested content, and add rounded controls with themed checked, hover, and keyboard-focus states. Restrict completed styling to the item's paragraphs so nested tasks stay readable. Do not reparse Markdown emitted by the editor as initial content: empty task items and headings must remain editable. Label toolbar controls for assistive technology. Validation performed before commit: frontend production build; Chromium and WebKit input, selection, task toggle/nesting/wrapping, and save/reopen checks; native WKWebView empty-body caret screenshots. The user confirmed the caret and checkbox fixes in the local desktop app. --- .../common/FloatickTiptapEditor.tsx | 21 +++++-- src/index.css | 59 +++++++++++++------ 2 files changed, 57 insertions(+), 23 deletions(-) diff --git a/src/components/common/FloatickTiptapEditor.tsx b/src/components/common/FloatickTiptapEditor.tsx index 1350006..f5b6067 100644 --- a/src/components/common/FloatickTiptapEditor.tsx +++ b/src/components/common/FloatickTiptapEditor.tsx @@ -272,6 +272,7 @@ const ToolbarButton: React.FC = ({ >