|
|
@@ -473,7 +473,7 @@ export default class Renderer {
|
|
|
i++;
|
|
|
} else if ( action === 'delete' ) {
|
|
|
// Whenever element is removed from DOM, unbind it and all of its children.
|
|
|
- unbindDeep( actualDomChildren[ i ], this.domConverter );
|
|
|
+ this.domConverter.unbindDomElement( actualDomChildren[ i ] );
|
|
|
remove( actualDomChildren[ i ] );
|
|
|
} else { // 'equal'
|
|
|
i++;
|
|
|
@@ -687,16 +687,3 @@ function trimSelection( selection ) {
|
|
|
|
|
|
return newSelection;
|
|
|
}
|
|
|
-
|
|
|
-// Unbind given `domElement` and all of its children from view using given `domConverter`.
|
|
|
-//
|
|
|
-// @private
|
|
|
-// @param {HTMLElement} domElement
|
|
|
-// @param {module:engine/view/domconverter~DomConverter}
|
|
|
-function unbindDeep( domElement, domConverter ) {
|
|
|
- domConverter.unbindDomElement( domElement );
|
|
|
-
|
|
|
- for ( let child of domElement.childNodes ) {
|
|
|
- unbindDeep( child, domConverter );
|
|
|
- }
|
|
|
-}
|