Fix allowTransparency in lib and demo

Fixes #5558
Fixes #5560
This commit is contained in:
Daniel Imms
2025-12-31 05:00:33 -08:00
parent 982f5e15ff
commit d143340b60
7 changed files with 100 additions and 64 deletions
+2
View File
@@ -436,6 +436,8 @@ export class CoreBrowserTerminal extends CoreTerminal implements ITerminal {
this.element.dir = 'ltr'; // xterm.css assumes LTR
this.element.classList.add('terminal');
this.element.classList.add('xterm');
this.element.classList.toggle('allow-transparency', this.options.allowTransparency);
this._register(this.optionsService.onSpecificOptionChange('allowTransparency', value => this.element!.classList.toggle('allow-transparency', value)));
parent.appendChild(this.element);
// Performance: Use a document fragment to build the terminal
+1
View File
@@ -71,6 +71,7 @@ export class Viewport extends Disposable {
this._scrollableElement.setScrollDimensions({ height: 0, scrollHeight: 0 });
this._register(Event.runAndSubscribe(themeService.onChangeColors, () => {
element.style.backgroundColor = themeService.colors.background.css;
this._scrollableElement.getDomNode().style.backgroundColor = themeService.colors.background.css;
}));
element.appendChild(this._scrollableElement.getDomNode());