Copy Plot at Custom Size does not copy in Firefox when the console is busy
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, typescript
Hướng nghiên cứu
Start by tracing the Copy Plot at Custom Size dialog and clipboard service; the issue does not name their files. Read the existing image clipboard write path and reproduce the steps in Firefox with the R console busy. Done when the copied plot is on the clipboard after the console becomes idle, including the delayed draw described here.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
System details:
Positron and OS details:
Positron Web built from source on #17554, macOS, Firefox 155.0.1.
Session details:
R
Describe the issue:
In Positron Web on Firefox, Copy Plot at Custom Size does not copy the plot if the console is busy when you click Copy.
The dialog draws the plot before it writes it to the clipboard. If the console is busy, the draw waits until the console is idle. Firefox lets a page write to the clipboard only for a few seconds after a click, so the late write is blocked. Chrome does not have this limit. I did not test Safari, which has a stricter limit.
With #17554, the dialog shows an error in this case instead of "Plot copied to clipboard."
Steps to reproduce the issue:
- Open Positron Web in Firefox and start an R console.
- Run
plot(1:10). - In the Plots pane, open the Copy menu and select "Copy Plot at Custom Size...".
- Run
Sys.sleep(12)in the console. - While the console is busy, click Copy in the dialog.
Expected or desired behavior:
The plot is on the clipboard after the console is idle.
I see two possible fixes:
- Start the clipboard write when the user clicks Copy, with an image that is not ready yet (a
ClipboardItemwith aPromise<Blob>). The write then belongs to the click. It needs a new clipboard service method, becausewriteImagetakes only finished image data. Before I build it, I must make sure that Firefox accepts a promise that resolves many seconds later. - If the write is blocked, keep the drawn image and keep the dialog open, with a note that tells the user to click Copy again. The second click writes the image immediately. This works in all browsers but needs two clicks.
Were there any error messages in the UI, Output panel, or Developer Tools console?
"Error copying plot: Clipboard write was blocked due to lack of user activation." The write starts about 11 seconds after the click and fails with NotAllowedError.
- Ngôn ngữ chính
- TypeScript
- Star
- 4.4k
- Fork
- 207
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 308
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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 posit-dev/positron
-
area: assistant area: ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility area: plots area: ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: plots area: ui bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: kernels lang: r
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
posit-dev/positron#17575 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Memory meter counts page cache as used memory under a cgroup limitCó thể đã có người làm @jmcphers đã nhận 10 ngày trước. Đang mởarea: workbench bug memory-use support
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
posit-dev/positron#17414 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của posit-dev/positron
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
laststance/design-world#98 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: KCM True crimeĐang mởapproved check:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
triage: failed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
oxc-project/tsrs#1277 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ardia-browser/ardia#6798 ·
Maintainer thường phản hồi trong vòng 1 ngày