Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/core/src/block/base/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,16 +211,16 @@ class Content extends TreeNode {
const {
anchor,
focus,
anchorBlock,
focusBlock,
// anchorBlock,
// focusBlock,
isCollapsed,
isSelectionInSameBlock, // This is always be true.
direction,
type,
} = selection;

if (anchorBlock !== this || focusBlock !== this)
return null;
// if (anchorBlock !== this || focusBlock !== this)
// return null;

Comment on lines 211 to 224
return {
start: { offset: Math.min(anchor.offset, focus.offset) },
Expand Down
17 changes: 16 additions & 1 deletion packages/core/src/block/base/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,23 @@ class Format extends Content {
override blurHandler() {
super.blurHandler();
const needRender = this.checkNeedRender();
const _cursor = this.getCursor();
let cursor = null;
if (_cursor) {
const { start, end } = _cursor;
cursor = {
path: this.path,
block: this,
anchor: {
offset: start.offset,
},
focus: {
offset: end.offset,
},
};
}
if (needRender)
this.update();
cursor ? this.update(cursor) : this.update();
}
Comment on lines 337 to 357

/**
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/inlineRenderer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class InlineRenderer {
block,
cursor && cursor.block === block ? cursor : {},
);
domNode!.innerHTML = html;
if (domNode!.innerHTML !== html) {
domNode!.innerHTML = html;
}
}

collectReferenceDefinitions() {
Expand Down