Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(editor): allow copy in readonly mode (#11538)

Saul-Mironebda5562f9093
diff --git a/blocksuite/framework/std/src/inline/range/range-binding.ts b/blocksuite/framework/std/src/inline/range/range-binding.ts
index 22681e998b..6cf0f9d3dd 100644
--- a/blocksuite/framework/std/src/inline/range/range-binding.ts
+++ b/blocksuite/framework/std/src/inline/range/range-binding.ts
@@ -219,8 +219,8 @@ export class RangeBinding {
const closestExclude = el.closest(`[${RANGE_SYNC_EXCLUDE_ATTR}="true"]`);
if (closestExclude) return;
- const closestEditable = el.closest('[contenteditable="false"]');
- if (closestEditable) return;
+ const closestEditable = el.closest('[contenteditable]');
+ if (!closestEditable) return;
const startElement = getElement(range.startContainer);
const endElement = getElement(range.endContainer);