浏览代码

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 );