coder / code-server

VS Code in the browser
https://coder.com
MIT License
67.27k stars 5.51k forks source link

[Bug]: Some strings that contain colon(:) get converted to a link when copied on iPad #6660

Closed 54wedge closed 6 months ago

54wedge commented 6 months ago

Is there an existing issue for this?

OS/Web Information

Steps to Reproduce

  1. Start code-server
  2. Access code-server on iPad
  3. Copy a line of code with double colon and certain characters before it. eg.fmt::print(“hello”);

Expected

The copy and paste work correctly.

Actual

Code Result
fmt::print(“Hello world”); fmt:%3Aprint(%22Hello%20world%22);
t::print(“Hello world”); t:%3Aprint(%22Hello%20world%22);
::print(“Hello world”); ::print("Hello world");
_::print(Hello world); _::print("Hello world");
_fmt::print("Hello world"); _fmt::print("Hello world");

( _ represents a space)

Logs

No response

Screenshot/Video

https://github.com/coder/code-server/assets/20142690/da8b1eb2-edf9-49bf-af5b-d24f15743694

Does this issue happen in VS Code or GitHub Codespaces?

Are you accessing code-server over a secure context?

Notes

Copy works flawlessly in Safari on MacOS 12.6.

54wedge commented 6 months ago

I investigated a little deeper and it seems that strings containing certain alphanumeric characters and a single colon can not be copied correctly as well. (eg.default:{}—>default:%7B%7D) Pasting the code into apple notes shows that the copied string is converted to a link somehow.

code-asher commented 6 months ago

If this happens in Codespaces definitely raise it upstream so they can fix it there! https://github.com/microsoft/vscode

54wedge commented 6 months ago

Yeah. I figured that out. I will try to make a more detailed post there.