8
0
Pārlūkot izejas kodu

Added missing batch to the conversion api.

Oskar Wróbel 8 gadi atpakaļ
vecāks
revīzija
45620d53ae
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  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 );