Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Editor fails to start at the second time #7

Closed
gdlmx opened this issue May 2, 2018 · 1 comment
Closed

Editor fails to start at the second time #7

gdlmx opened this issue May 2, 2018 · 1 comment

Comments

@gdlmx
Copy link

gdlmx commented May 2, 2018

There is a weird behavior observed in my setup: After a file is open and then closed with Monaco, when it is open the second time, the following error message pops up in the Firefox JS console:

TypeError: this.editor is undefined [Learn More] index.js:72

which is corresponded to the following line:

this.editor.setValue(contextModel.toString());

This error prevents the editor to show up in the Jupyterlab window. It seems that the old MonacoWidget object is not destroyed when the editor tab is closed. Refreshing the webpage solved this problem.

My environment:

  • jupyterlab-monaco commit f710e41
  • Firefox 59.0.2
  • Jupyterlab 0.32.1
@spec2e
Copy link

spec2e commented May 25, 2018

Had the same problem. Created a pull request that fixes this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants