Skip to content

Commit

Permalink
Fix click event bug caused by DomRenderer replaceChildren behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
jtbandes committed Dec 13, 2024
1 parent 41e8ae3 commit 1978399
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/browser/renderer/dom/DomRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;` +
Expand Down

0 comments on commit 1978399

Please sign in to comment.