Merge branch 'master' into decoration_queue

This commit is contained in:
Daniel Imms
2022-02-23 13:41:46 -08:00
committed by GitHub
9 changed files with 476 additions and 31 deletions
-1
View File
@@ -53,7 +53,6 @@ export class AccessibilityManager extends Disposable {
) {
super();
this._accessibilityTreeRoot = document.createElement('div');
this._accessibilityTreeRoot.setAttribute('role', 'document');
this._accessibilityTreeRoot.classList.add('xterm-accessibility');
this._accessibilityTreeRoot.tabIndex = 0;
+11 -17
View File
@@ -134,23 +134,6 @@ export class Decoration extends Disposable implements IDecoration {
} else {
this._element.style.left = this.x ? `${this.x * renderService.dimensions.actualCellWidth}px` : '';
}
this.register({
dispose: () => {
if (this.isDisposed) {
return;
}
if (!this.marker.isDisposed) {
this.marker.dispose();
}
if (this._element && this._container.contains(this._element)) {
this._container.removeChild(this._element);
}
this.isDisposed = true;
// Emit before super.dispose such that dispose listeners get a change to react
this._onDispose.fire();
super.dispose();
}
});
}
private _refreshStyle(renderService: IRenderService): void {
@@ -166,4 +149,15 @@ export class Decoration extends Disposable implements IDecoration {
this._element.style.display = this._bufferService.buffer === this._bufferService.buffers.alt ? 'none' : 'block';
}
}
public override dispose(): void {
if (this.isDisposed) {
return;
}
if (this._element && this._container.contains(this._element)) {
this._container.removeChild(this._element);
}
this.isDisposed = true;
this._onDispose.fire();
}
}