xterm.js icon indicating copy to clipboard operation
xterm.js copied to clipboard

xterm/addon-image makes terminal unusable on Chrome/Android

Open afska opened this issue 9 months ago • 1 comments

Minimal reproducible example: https://codesandbox.io/p/sandbox/xterm-image-addon-forked-ptwk3t

Versions:

    "@xterm/xterm": "5.5.0",
    "@xterm/addon-image": "0.8.0",
    "@xterm/addon-fit": "0.10.0"

On Chrome/Windows renders correctly: Image

On Chrome/Android, the image hides the text: Image

It's worth noting that the terminal renders correctly in the tab preview: Image

afska avatar May 29 '25 00:05 afska

This is most likely an issue with the browser engine not allowing transparent canvas overlays. The image addon places a second canvas above the text canvas (webgl renderer) or the text DOM nodes (DOM renderer), which should be transparent.

It was reported, that some graphic card combinations on desktop just dont allow transparent canvas with chrome, so would always render them with a black background. On desktop the issue can be resolved for some ppl by adjusting the hardware acceleration settings during chrome startup. Also note that this is a chrome only issue, it always seems to work fine with firefox or webkit browsers.

Well thats just a guess, you'd need to further debug things to see whether the whole canvas is indeed black.

jerch avatar May 29 '25 10:05 jerch