mirror of
https://github.com/codex-team/editor.js
synced 2024-06-26 09:20:07 +02:00
Fix issue 943 (#965)
This commit is contained in:
parent
461f9a5794
commit
3e2bf87841
2
dist/editor.js
vendored
2
dist/editor.js
vendored
File diff suppressed because one or more lines are too long
|
@ -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
|
||||
|
||||
|
|
|
@ -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 ) {
|
||||
|
|
Loading…
Reference in a new issue