Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using letter-spacing globally messes up selecting. #4881

Open
Linux123123 opened this issue Nov 14, 2023 · 5 comments
Open

Using letter-spacing globally messes up selecting. #4881

Linux123123 opened this issue Nov 14, 2023 · 5 comments
Labels
area/selection type/bug Something is misbehaving

Comments

@Linux123123
Copy link

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

  1. Set letter spacing in body to anything other then normal (for example letter-spacing: 0.015em;)
  2. Observe selecting messing up

image
image

Usually can get detected by trying to select from the end, or starting select on a space.

@jerch
Copy link
Member

jerch commented Nov 14, 2023

I cannot repro with master. Can you give a bit more information or a small screen cast showing the misbehavior?

@Linux123123
Copy link
Author

A simple reproduction
https://codesandbox.io/p/sandbox/currying-dream-mk2ctn

@Tyriar
Copy link
Member

Tyriar commented Nov 14, 2023

Can repro some weirdness in normal selection and when holding alt:
image

Recording 2023-11-14 at 07 27 12

Didn't check if it happens on tip of master though

@Tyriar Tyriar added type/bug Something is misbehaving area/selection and removed needs more info labels Nov 14, 2023
@Linux123123
Copy link
Author

I can confirm that it still happens on "@xterm/xterm": "5.4.0-beta.14", which is like 5 days old.

@jerch
Copy link
Member

jerch commented Nov 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/selection type/bug Something is misbehaving
Projects
None yet
Development

No branches or pull requests

3 participants