Fix #99316. Clear context when notebook is being removed from DOM.
This commit is contained in:
parent
90a39ba0d4
commit
8fc68f7974
1 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,9 @@ export class NotebookEditor extends BaseEditor {
|
|||
// make sure the editor widget is removed from the view
|
||||
const existingEditorWidgetForInput = NotebookRegistry.getNotebookEditorWidget(this.input as NotebookEditorInput);
|
||||
if (existingEditorWidgetForInput) {
|
||||
// the editor widget is only referenced by the editor input
|
||||
// clear its state
|
||||
existingEditorWidgetForInput?.onWillHide();
|
||||
existingEditorWidgetForInput?.getDomNode().remove();
|
||||
existingEditorWidgetForInput?.dispose();
|
||||
NotebookRegistry.releaseNotebookEditorWidget(this.input as NotebookEditorInput);
|
||||
|
|
Loading…
Reference in a new issue