Skip to content

Commit 1978399

Browse files
committed
Fix click event bug caused by DomRenderer replaceChildren behavior
1 parent 41e8ae3 commit 1978399

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/browser/renderer/dom/DomRenderer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ export class DomRenderer extends Disposable implements IRenderer {
161161
// Base CSS
162162
let styles =
163163
`${this._terminalSelector} .${ROW_CONTAINER_CLASS} {` +
164+
// Disabling pointer events circumvents a browser behavior that prevents `click` events from
165+
// being delivered if the target element is replaced during the click. This happened due to
166+
// refresh() being called during the mousedown handler to start a selection.
167+
` pointer-events: none;` +
164168
` color: ${colors.foreground.css};` +
165169
` font-family: ${this._optionsService.rawOptions.fontFamily};` +
166170
` font-size: ${this._optionsService.rawOptions.fontSize}px;` +

0 commit comments

Comments
 (0)