diff --git a/css/xterm.css b/css/xterm.css index 38e27a00..4e1aad14 100644 --- a/css/xterm.css +++ b/css/xterm.css @@ -173,3 +173,8 @@ .xterm-strikethrough { text-decoration: line-through; } + +.xterm-screen canvas .xterm-decoration { + z-index: 6; + position: absolute; +} diff --git a/src/browser/services/DecorationsService.ts b/src/browser/services/DecorationsService.ts index ecb60020..a8a10916 100644 --- a/src/browser/services/DecorationsService.ts +++ b/src/browser/services/DecorationsService.ts @@ -54,7 +54,7 @@ export class DecorationsService extends Disposable implements IDecorationsServic if (line < 0 || line > this._bufferService.rows) { decoration.element.style.display = 'none'; } else { - decoration.element.style.top = `${(line)*this._renderService.dimensions.scaledCellHeight}px`; + decoration.element.style.top = `${line *this._renderService.dimensions.scaledCellHeight}px`; decoration.element.style.display = 'block'; } } @@ -129,10 +129,8 @@ class BufferDecoration extends Disposable implements IDecoration { this._element.style.width = `${this._decorationOptions.width}px`; this._element.style.height = `${this._decorationOptions.height}px`; this._element.style.top = `${this._marker.line * this._renderService.dimensions.scaledCellHeight}px`; - this._element.style.zIndex = '6'; - this._element.style.position = 'absolute'; if (this._decorationOptions.x && this._decorationOptions.x < 0) { - throw new Error(`cannot create a decoration with a negative x offset: ${this._decorationOptions.x}`); + throw new Error(`Cannot create a decoration with a negative x offset: ${this._decorationOptions.x}`); } if (this._decorationOptions.anchor === 'right') { this._element.style.right = this._decorationOptions.x ? `${this._decorationOptions.x * this._renderService.dimensions.scaledCellWidth}px` : '';