diff --git a/frontend/src/features/workspace/WorkspaceView.tsx b/frontend/src/features/workspace/WorkspaceView.tsx index ec922f6..f8bcac3 100644 --- a/frontend/src/features/workspace/WorkspaceView.tsx +++ b/frontend/src/features/workspace/WorkspaceView.tsx @@ -449,7 +449,8 @@ export const WorkspaceView: React.FC = ({ } catch {} }; - const handleBlockFocus = (blockId?: string) => { + const handleBlockFocus = (blockIdOrEvent?: string | React.FocusEvent) => { + const blockId = typeof blockIdOrEvent === 'string' ? blockIdOrEvent : undefined; isEditorFocusedRef.current = true; if (idleUnlockTimerRef.current) { clearTimeout(idleUnlockTimerRef.current); diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts index a29321b..2eb2bb8 100644 --- a/frontend/src/lib/types.ts +++ b/frontend/src/lib/types.ts @@ -157,12 +157,15 @@ export type BlockType = 'h1' | 'h2' | 'h3' | 'paragraph' | 'todo' | 'bullet' | ' export interface DocumentBlock { id: string; + docId?: string; type: BlockType; content: string; checked?: boolean; lang?: string; level?: number; collapsed?: boolean; + sortOrder?: number; + updatedAt?: string; } export interface DocBlocksPatchRequest {