Microsoft/vscode

(Web, Safari) Copying and pasting line with colon and no leading space results in URL encoding of pasted text

Open

#235,666 建立於 2024年12月9日

在 GitHub 查看
 (5 留言) (1 反應) (1 負責人)TypeScript (10,221 fork)batch import
bugeditor-clipboardhelp wantedios-ipados

倉庫指標

Star
 (74,848 star)
PR 合併指標
 (平均合併 11小時 43分鐘) (30 天內合併 1,000 個 PR)

描述

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: Web
  • OS Version: iPadOS 18.1 (Safari)

VSCode Web on iPadOS/Safari appears to be erroneously encoding certain copied text as a URL.

So copying this string of text from a VSCode Web file: foo: bar

And pasting it into another VSCode web file will result in: foo:%20bar

This is only the case if there isn’t a space before the colon anywhere on the line. So, foo: bar and foo bar: baz both copy and paste normally.

This also only happens within VSCode web. So, copying foo: bar from an external app and pasting it into VSCode Web or copying foo: bar from VSCode web into another app both work fine.

I have not been able to reproduce this on VSCode Web on Mac or Windows.

Steps to Reproduce:

  1. On iPadOS on Safari, open a new file on VSCode Web (or Github Codespaces)
  2. Write text foo: bar
  3. Copy to clipboard, where the first character of selection is NOT whitespace
  4. Paste into same file.

https://github.com/user-attachments/assets/0dca81bb-fee2-4623-9ed4-0441ff70231e

貢獻者指南