Skip to content

Commit

Permalink
fix(inline): range in different document (#8986)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flrande committed Dec 16, 2024
1 parent 6578bef commit 284296e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/framework/inline/src/services/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export class EventService<TextAttributes extends BaseTextAttributes> {
private _isComposing = false;

private _isRangeCompletelyInRoot = (range: Range) => {
if (range.commonAncestorContainer.ownerDocument !== document) return false;

const rootElement = this.editor.rootElement;
const rootRange = document.createRange();
rootRange.selectNode(rootElement);
Expand Down

0 comments on commit 284296e

Please sign in to comment.