Terminal loses text selection whenever a TUI enables mouse reporting — no way to opt out in the browser
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript, vscode
- Lĩnh vực
- developer-experience, frontend, web-dev
Hướng nghiên cứu
Bắt đầu bằng cách lần theo phần tích hợp terminal của code-server và việc sử dụng bản build @xterm/xterm 6.1.0-beta.291 được đóng gói sẵn, sau đó so sánh cách có thể cấu hình mouseEventsRequireAlt. Kiểm tra terminal FAQ để xem cách thoát bằng Shift+drag. Được xem là hoàn tất khi người dùng trình duyệt có thể giữ nguyên vùng chọn trong terminal trong khi tính năng báo cáo chuột vẫn khả dụng, hoặc khi giới hạn và workaround được ghi lại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
Any TUI that enables mouse reporting (CSI ? 1000 h) takes the click away from xterm.js, so a plain drag in the terminal no longer creates a selection. On the desktop that is annoying; in code-server it removes the last reliable path to the OS clipboard, because the DOM selection is what the browser's own copy relies on — the VS Code copy commands go through an async IPC hop that loses the clipboard user-gesture.
Concretely: with a full-screen TUI running (e.g. Claude Code with tui: fullscreen), users cannot copy terminal text out of the browser at all, unless they know that Shift+drag forces a selection.
Measured
Loaded the exact @xterm/xterm build shipped by code-server (6.1.0-beta.291) standalone and drove it with real mouse events:
| Mouse tracking armed | plain drag | Shift + drag |
|---|---|---|
| none | selection | selection |
?1000h ?1006h |
nothing | selection |
?1000h ?1002h ?1003h ?1006h |
nothing | selection |
Ask
xterm.js already has the option that solves this — mouseEventsRequireAlt, which keeps tracking armed but only claims the click while a modifier is held. It is not referenced anywhere in the VS Code build that code-server ships, so it stays at its default.
I have opened an upstream request for VS Code to expose it as a terminal setting: https://github.com/microsoft/vscode/issues/330052. Filing here as well because the browser case is materially worse than the desktop one, and because code-server may want to set the option (or surface a preference) ahead of upstream.
At minimum, documenting Shift+drag as the escape hatch in the terminal FAQ would already help.
- Ngôn ngữ chính
- TypeScript
- Star
- 79.4k
- Fork
- 6.9k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 39
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của coder/code-server
-
Bump proxy-addr to 2.0.8 Đang mởsecurity
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
coder/code-server#8013 · 3 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
coder/code-server#7976 · 2 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
coder/code-server#7962 · 3 bình luận ·
-
bug needs-investigation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
coder/code-server#7955 · 1 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 42/100
coder/code-server#7948 · 1 bình luận · 2 reaction ·
Tất cả issue của coder/code-server
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
0xMiden/bridge-portal#132 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
-
area:tools bug good first issue help wanted priority:P2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
newrelic-experimental/preflight#793 · 1 bình luận ·