Skip to content

Commit

Permalink
Merge pull request #120 from editor-js/caret-lost-on-merge-bugfix
Browse files Browse the repository at this point in the history
fix caret loss on merge
  • Loading branch information
neSpecc authored Oct 9, 2024
2 parents d5fc14d + 4df5def commit 3e457cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@editorjs/header",
"version": "2.8.7",
"version": "2.8.8",
"keywords": [
"codex editor",
"header",
Expand Down
7 changes: 1 addition & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,7 @@ export default class Header {
* @public
*/
merge(data: HeaderData): void {
const newData = {
text: this.data.text + data.text,
level: this.data.level,
};

this.data = newData;
this._element.insertAdjacentHTML('beforeend', data.text)
}

/**
Expand Down

0 comments on commit 3e457cb

Please sign in to comment.