瀏覽代碼

Use `Selection` class instead of `DocumentSelection` to check if `insertContent()` needs to create `Selection` instance.

Maciej Gołaszewski 7 年之前
父節點
當前提交
005c98d3fe
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/ckeditor5-engine/src/model/utils/insertcontent.js

+ 1 - 1
packages/ckeditor5-engine/src/model/utils/insertcontent.js

@@ -38,7 +38,7 @@ export default function insertContent( model, content, selectable ) {
 
 		if ( !selectable ) {
 			selection = model.document.selection;
-		} else if ( selectable instanceof DocumentSelection ) {
+		} else if ( selectable instanceof Selection ) {
 			selection = selectable;
 		} else {
 			selection = new Selection( selectable );