From b6d443550ef68c8d5930a341304f8a28615be23e Mon Sep 17 00:00:00 2001 From: Pinghao Wu Date: Tue, 5 Mar 2024 01:10:53 +0800 Subject: [PATCH] DomRenderer: fix touch scrolling starting from text When scrolling with touchscreen starting from text, as soon as touch leaves the text span, the touch event stops, making touch-scrolling able to scroll one row only. This fixes it by setting `pointer-events: none` to text spans, excluding them from hit-testing so that touch events won't be constrained to them. Fixes #3613 --- src/browser/renderer/dom/DomRenderer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/browser/renderer/dom/DomRenderer.ts b/src/browser/renderer/dom/DomRenderer.ts index 1549b1307c..c6ffaa647d 100644 --- a/src/browser/renderer/dom/DomRenderer.ts +++ b/src/browser/renderer/dom/DomRenderer.ts @@ -143,6 +143,7 @@ export class DomRenderer extends Disposable implements IRenderer { ` display: inline-block;` + // TODO: find workaround for inline-block (creates ~20% render penalty) ` height: 100%;` + ` vertical-align: top;` + + ` pointer-events: none;` + `}`; this._dimensionsStyleElement.textContent = styles;