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

Remove all root attributes in View#detachDomRoot() to get rid of disableEditingRootListeners() in *EditableUiView classes.

Aleksander Nowodzinski 7 лет назад
Родитель
Сommit
945b1c10bc
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      packages/ckeditor5-engine/src/view/view.js

+ 5 - 0
packages/ckeditor5-engine/src/view/view.js

@@ -230,6 +230,11 @@ export default class View {
 		const viewRoot = this.document.getRoot( name );
 
 		this.change( writer => {
+			// Remove all root attributes so the element is bare.
+			for ( const attributeName of viewRoot.getAttributeKeys() ) {
+				writer.removeAttribute( attributeName, viewRoot );
+			}
+
 			// Clean-up the changes made by the change:isReadOnly listener.
 			writer.removeAttribute( 'contenteditable', viewRoot );