Skip to content

Commit

Permalink
fix editors theme change and widget not attached error (#13757)
Browse files Browse the repository at this point in the history
Signed-off-by: Jonah Iden <jonah.iden@typefox.io>
  • Loading branch information
jonah-iden authored Jun 4, 2024
1 parent 4456fde commit a6fb882
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export class MonacoStandaloneThemeService extends StandaloneThemeService {
for (let i = 0; i < this.styleElements.length; i++) {
if (this.styleElements[i] === style) {
this.styleElements.splice(i, 1);
style.remove();
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export class CellOutputWebviewImpl implements CellOutputWebview, Disposable {
}

this.webviewWidget = await this.widgetManager.getOrCreateWidget(WebviewWidget.FACTORY_ID, { id: this.id });
this.webviewWidget.parent = this.editor ?? null;
this.webviewWidget.setContentOptions({
allowScripts: true,
// eslint-disable-next-line max-len
Expand Down

0 comments on commit a6fb882

Please sign in to comment.