Explorar el Código

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

Aleksander Nowodzinski hace 7 años
padre
commit
945b1c10bc
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  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 );
 		const viewRoot = this.document.getRoot( name );
 
 
 		this.change( writer => {
 		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.
 			// Clean-up the changes made by the change:isReadOnly listener.
 			writer.removeAttribute( 'contenteditable', viewRoot );
 			writer.removeAttribute( 'contenteditable', viewRoot );