xterm.js
xterm.js copied to clipboard
Using `letter-spacing` globally messes up selecting.
letter-spacing
other then normal
messes up with console text selecting.
Details
- Browser and browser version: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
- OS version: n/a
- xterm.js version: latest
Steps to reproduce
- Set letter spacing in body to anything other then normal (for example
letter-spacing: 0.015em;
) - Observe selecting messing up
Usually can get detected by trying to select from the end, or starting select on a space.
I cannot repro with master. Can you give a bit more information or a small screen cast showing the misbehavior?
A simple reproduction https://codesandbox.io/p/sandbox/currying-dream-mk2ctn
Can repro some weirdness in normal selection and when holding alt:
Didn't check if it happens on tip of master though
I can confirm that it still happens on "@xterm/xterm": "5.4.0-beta.14"
, which is like 5 days old.
Yeah can repro it with your example on FF and chrome. On a sidenote - the wrong doubled highlighting starts at half of the correct position, and letter-spacing is at 0.5em, hmm.