提交 8fc68f79 编写于 作者: R rebornix

Fix #99316. Clear context when notebook is being removed from DOM.

上级 90a39ba0
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册