Skip to content

Extended monaco editor does not recreate after unmounting from dom #917

Open
@asimaranov

Description

@asimaranov

When editor component is unmounted (user click back button in modal with editor and opens it again), monaco editor is not shown back then. Problem only appears when extended editor is used (with views service). The same issue is presented in example https://typefox.github.io/monaco-languageclient/ghp_react_appPlayground.html

When I first click start, the editor appears. On next click it hides. On next click editor does not appear. Error in console -

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'setAsDefaultApi')
    at xf (common-C96ELLcV.js:14:165122)
    at onLoad (reactMain-BG3p6kyB.js:1:811)
    at P (index-DXSjOzOC.js:33:170991)
    at async index-DXSjOzOC.js:33:171134

Issue is a blocker for me. Appreciate any help to solve the issue

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions