From 2437313ca469a2ca27bb53f598e8a662913bb1cc Mon Sep 17 00:00:00 2001 From: Alexandru Dima Date: Fri, 23 Apr 2021 13:28:19 +0200 Subject: [PATCH] Fixes #121535 --- src/vs/base/browser/ui/scrollbar/scrollableElement.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts index 733e913ae6f..bb4476f11b3 100644 --- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts +++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts @@ -214,7 +214,7 @@ export abstract class AbstractScrollableElement extends Widget { this._domNode.appendChild(this._topShadowDomNode.domNode); this._topLeftShadowDomNode = createFastDomNode(document.createElement('div')); - this._topLeftShadowDomNode.setClassName('shadow top-left-corner'); + this._topLeftShadowDomNode.setClassName('shadow'); this._domNode.appendChild(this._topLeftShadowDomNode.domNode); } else { this._leftShadowDomNode = null; @@ -484,9 +484,12 @@ export abstract class AbstractScrollableElement extends Widget { const enableTop = scrollState.scrollTop > 0; const enableLeft = scrollState.scrollLeft > 0; - this._leftShadowDomNode!.setClassName('shadow' + (enableLeft ? ' left' : '')); - this._topShadowDomNode!.setClassName('shadow' + (enableTop ? ' top' : '')); - this._topLeftShadowDomNode!.setClassName('shadow top-left-corner' + (enableTop ? ' top' : '') + (enableLeft ? ' left' : '')); + const leftClassName = (enableLeft ? ' left' : ''); + const topClassName = (enableTop ? ' top' : ''); + const topLeftClassName = (enableLeft || enableTop ? ' top-left-corner' : ''); + this._leftShadowDomNode!.setClassName(`shadow${leftClassName}`); + this._topShadowDomNode!.setClassName(`shadow${topClassName}`); + this._topLeftShadowDomNode!.setClassName(`shadow${topLeftClassName}${topClassName}${leftClassName}`); } }