Ver Fonte

Check if there is corresponding DOM element on rendering.

Piotr Jasiun há 9 anos atrás
pai
commit
0555f40b52
1 ficheiros alterados com 6 adições e 1 exclusões
  1. 6 1
      packages/ckeditor5-engine/src/view/renderer.js

+ 6 - 1
packages/ckeditor5-engine/src/view/renderer.js

@@ -167,7 +167,7 @@ export default class Renderer {
 
 			if ( this._needAddInlineFiller() ) {
 				this._inlineFillerPosition = this.selection.getFirstPosition();
-				this.markedChildren.add( this._inlineFillerPosition.parent );
+				this.markToSync( 'children', this._inlineFillerPosition.parent );
 			} else {
 				this._inlineFillerPosition = null;
 			}
@@ -411,6 +411,11 @@ export default class Renderer {
 		}
 
 		const domRoot = this.domConverter.getCorrespondingDomElement( this.focusedEditable );
+
+		if ( !domRoot ) {
+			return;
+		}
+
 		const domSelection = domRoot.ownerDocument.defaultView.getSelection();
 		const oldViewSelection = domSelection && this.domConverter.domSelectionToView( domSelection );