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.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
perf(editor): avoid redundant dom query when editing single block (#11732)
Yifeng Wang16f7be7f0b50
diff --git a/blocksuite/framework/std/src/inline/range/inline-range-provider.ts b/blocksuite/framework/std/src/inline/range/inline-range-provider.tsindex f53afedc27..eb4b85a34a 100644--- a/blocksuite/framework/std/src/inline/range/inline-range-provider.ts+++ b/blocksuite/framework/std/src/inline/range/inline-range-provider.ts@@ -40,6 +40,13 @@ export const getInlineRangeProvider: (return null;}+ if (+ textSelection.isInSameBlock() &&+ textSelection.from.blockId !== element.blockId+ ) {+ return null;+ }+const elementRange = rangeManager.textSelectionToRange(selectionManager.create(TextSelection, {from: {@@ -98,6 +105,7 @@ export const getInlineRangeProvider: (inlineRange$.value = null;return;}+const inlineRange = calculateInlineRange(range, textSelection);inlineRange$.value = inlineRange;})