From e5d0cf1fdddc73174a555e675b21049a166cbca8 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Mon, 25 Apr 2022 10:55:14 +0800 Subject: [PATCH] fix: status selection style --- packages/client/src/tiptap/extensions/status.ts | 2 +- packages/client/src/tiptap/styles/selection.scss | 3 ++- packages/client/src/tiptap/wrappers/status/index.tsx | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/src/tiptap/extensions/status.ts b/packages/client/src/tiptap/extensions/status.ts index 7d30c59..5879a04 100644 --- a/packages/client/src/tiptap/extensions/status.ts +++ b/packages/client/src/tiptap/extensions/status.ts @@ -21,8 +21,8 @@ export const Status = Node.create({ name: 'status', group: 'inline', inline: true, - atom: true, selectable: true, + atom: true, addAttributes() { return { diff --git a/packages/client/src/tiptap/styles/selection.scss b/packages/client/src/tiptap/styles/selection.scss index 458398e..b5bb29b 100644 --- a/packages/client/src/tiptap/styles/selection.scss +++ b/packages/client/src/tiptap/styles/selection.scss @@ -29,7 +29,8 @@ .node-mind, .node-codeBlock, .node-documentChildren, - .node-documentReference { + .node-documentReference, + .node-status { &.selected-node { &:not(.has-focus) { ::selection { diff --git a/packages/client/src/tiptap/wrappers/status/index.tsx b/packages/client/src/tiptap/wrappers/status/index.tsx index f18dcd2..39554cb 100644 --- a/packages/client/src/tiptap/wrappers/status/index.tsx +++ b/packages/client/src/tiptap/wrappers/status/index.tsx @@ -92,6 +92,7 @@ export const StatusWrapper = ({ editor, node, updateAttributes }) => { {isEditable ? (