Browse Source

Unified the UI destruction process across the editors.

Aleksander Nowodzinski 7 năm trước cách đây
mục cha
commit
93be7bb4b9
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      packages/ckeditor5-editor-decoupled/src/decouplededitorui.js

+ 10 - 0
packages/ckeditor5-editor-decoupled/src/decouplededitorui.js

@@ -109,6 +109,16 @@ export default class DecoupledEditorUI extends EditorUI {
 		this.ready();
 	}
 
+	/**
+	 * @inheritDoc
+	 */
+	destroy() {
+		this.view.editable.disableDomRootActions();
+		this.editor.editing.view.detachDomRoots();
+
+		super.destroy();
+	}
+
 	/**
 	 * Initializes the inline editor toolbar and its panel.
 	 *