Selaa lähdekoodia

Improved checking if target element is a root.

Oskar Wróbel 8 vuotta sitten
vanhempi
commit
ba50862e8b
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      packages/ckeditor5-engine/src/model/documentselection.js

+ 1 - 1
packages/ckeditor5-engine/src/model/documentselection.js

@@ -723,7 +723,7 @@ function clearAttributesStoredInElement( changes, batch, document ) {
 
 	// `changes.range` is not set in case of rename, root and marker operations.
 	// None of them may lead to the element becoming non-empty.
-	if ( !changeParent || changeParent.isEmpty ) {
+	if ( !changeParent || changeParent.is( 'documentFragment' ) || changeParent.isEmpty ) {
 		return;
 	}