Fix issue 943 (#965)

This commit is contained in:
George Berezhnoy 2019-11-30 14:29:03 +03:00 committed by GitHub
parent 461f9a5794
commit 3e2bf87841
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

2
dist/editor.js vendored

File diff suppressed because one or more lines are too long

View file

@ -7,6 +7,7 @@
`New` *API* — Block [lifecycle hooks](tools.md#block-lifecycle-hooks)
- `Fix` — On selection from end to start backspace is working as expected now [#869](https://github.com/codex-team/editor.js/issues/869)
`Fix` — Fix flipper with empty dom iterator [#926](https://github.com/codex-team/editor.js/issues/926)
- `Fix` — Normalize node before walking through children at `isEmpty` method [943](https://github.com/codex-team/editor.js/issues/943)
### 2.15.1

View file

@ -370,6 +370,11 @@ export default class Dom {
return this.isNodeEmpty(node);
}
/**
* Normalize node to merge several text nodes to one to reduce tree walker iterations
*/
node.normalize();
treeWalker.push(node.firstChild);
while ( treeWalker.length > 0 ) {