Skip to content

Commit

Permalink
Merge pull request #15900 from ckeditor/cc/5992-minimap-in-iframe
Browse files Browse the repository at this point in the history
Fix (minimap): The Minimap feature should not throw an error if an editing view rendering is performed while the editor is getting destroyed (e.g. a clean-up rendering).
  • Loading branch information
oleq committed Feb 22, 2024
2 parents 00b00d4 + 6c925de commit 4c08d35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/ckeditor5-minimap/src/minimap.ts
Expand Up @@ -65,6 +65,8 @@ export default class Minimap extends Plugin {
* @inheritDoc
*/
public override destroy(): void {
super.destroy();

this._minimapView!.destroy();
this._minimapView!.element!.remove();
}
Expand All @@ -91,6 +93,10 @@ export default class Minimap extends Plugin {
this._initializeMinimapView();

this.listenTo( editor.editing.view, 'render', () => {
if ( editor.state !== 'ready' ) {
return;
}

this._syncMinimapToEditingRootScrollPosition();
} );

Expand Down

0 comments on commit 4c08d35

Please sign in to comment.