Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor token colors stylesheet is only attached to DOM after the first editor was attached #1828

Closed
mofux opened this issue Feb 11, 2020 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@mofux
Copy link
Contributor

mofux commented Feb 11, 2020

monaco-editor version: 0.20.0
Browser: Chrome
OS: MacOS
Playground code that reproduces the issue:

After upgrading to 0.20.0 I've noticed that running monaco.editor.colorize will not highlight the produced output anymore. The tokens are there, and the token classes are set correctly (mtk{n}), but the styles for these tokens are missing (the style element with the monaco-colors class is missing).

Once adding the first editor to the page, the stylesheet gets added to the DOM and everything works as expected.

It's possible to call standaloneThemeService.get()._registerRegularEditorContainer() manually, but that's obviously quite a hack.

I think this change has introduced the regression:
microsoft/vscode@c201d89

@alexdima alexdima self-assigned this Feb 13, 2020
@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Feb 13, 2020
@alexdima alexdima added this to the February 2020 milestone Feb 13, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators May 28, 2020
@alexdima alexdima modified the milestones: February 2020, August 2020 Sep 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants