8
0
Просмотр исходного кода

Prevent of removing empty node in some special cases.

Mateusz Samsel 6 лет назад
Родитель
Сommit
b9c37e358c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/ckeditor5-engine/src/model/utils/insertcontent.js

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

@@ -562,7 +562,7 @@ class Insertion {
 
 				// Special case – parent is empty (<p>^</p>).
 				// We can remove the element after moving insertion position out of it.
-				if ( parent.isEmpty ) {
+				if ( parent.isEmpty && parent.parent === allowedIn ) {
 					this.writer.remove( parent );
 				}
 			} else if ( this.position.isAtEnd ) {