From 1978399259365a3d7e65b575068c58e0751e09f4 Mon Sep 17 00:00:00 2001 From: Jacob Bandes-Storch Date: Fri, 13 Dec 2024 13:57:17 -0800 Subject: [PATCH] Fix click event bug caused by DomRenderer replaceChildren behavior --- src/browser/renderer/dom/DomRenderer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/browser/renderer/dom/DomRenderer.ts b/src/browser/renderer/dom/DomRenderer.ts index f6fda22e6b..2274d043d0 100644 --- a/src/browser/renderer/dom/DomRenderer.ts +++ b/src/browser/renderer/dom/DomRenderer.ts @@ -161,6 +161,10 @@ export class DomRenderer extends Disposable implements IRenderer { // Base CSS let styles = `${this._terminalSelector} .${ROW_CONTAINER_CLASS} {` + + // Disabling pointer events circumvents a browser behavior that prevents `click` events from + // being delivered if the target element is replaced during the click. This happened due to + // refresh() being called during the mousedown handler to start a selection. + ` pointer-events: none;` + ` color: ${colors.foreground.css};` + ` font-family: ${this._optionsService.rawOptions.fontFamily};` + ` font-size: ${this._optionsService.rawOptions.fontSize}px;` +