Ver código fonte

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

Maciej Gołaszewski 7 anos atrás
pai
commit
005c98d3fe

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