Преглед на файлове

Added missing batch to the conversion api.

Oskar Wróbel преди 8 години
родител
ревизия
45620d53ae
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      packages/ckeditor5-typing/src/input.js

+ 4 - 1
packages/ckeditor5-typing/src/input.js

@@ -193,7 +193,10 @@ class MutationHandler {
 		// Create fresh DomConverter so it will not use existing mapping and convert current DOM to model.
 		// This wouldn't be needed if DomConverter would allow to create fresh view without checking any mappings.
 		const freshDomConverter = new DomConverter();
-		const modelFromCurrentDom = this.editor.data.toModel( freshDomConverter.domToView( domMutationCommonAncestor ) ).getChild( 0 );
+		const modelFromCurrentDom = this.editor.data.toModel(
+			freshDomConverter.domToView( domMutationCommonAncestor ),
+			this.editor.commands.get( 'input' ).buffer.batch
+		).getChild( 0 );
 
 		// Current model.
 		const currentModel = this.editor.editing.mapper.toModelElement( mutationsCommonAncestor );