Browse Source

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

Maciej Gołaszewski 7 years ago
parent
commit
005c98d3fe
1 changed files with 1 additions and 1 deletions
  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 );