Skip to content

Selection Restoration #27

@siddharthreddi

Description

@siddharthreddi

In Editor.save(), injecting nodes into a contenteditable that is about to be cleared by innerHTML or textContent assignment lead to "Lost Node" errors.

Fix: Calculate the offset based on the flat textContent length before the DOM is rebuilt, then traverse the new DOM to find the equivalent character position.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions