Skip to content

Commit

Permalink
DomRenderer: fix touch scrolling starting from text
Browse files Browse the repository at this point in the history
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 xtermjs#3613
  • Loading branch information
xdavidwu committed Mar 4, 2024
1 parent 1da0db4 commit b6d4435
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/browser/renderer/dom/DomRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b6d4435

Please sign in to comment.