Copy Plot at Custom Size does not copy in Firefox when the console is busy
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 4.4k
- フォーク
- 207
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 308
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
posit-dev/positron のほかの issue
-
area: assistant area: ui
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
accessibility area: plots area: ui
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area: plots area: ui bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area: kernels lang: r
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
posit-dev/positron#17575 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Memory meter counts page cache as used memory under a cgroup limit対応中かも @jmcphers が 10 日前に担当しました。 オープンarea: workbench bug memory-use support
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
posit-dev/positron#17414 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
posit-dev/positron の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
laststance/design-world#98 ·
メンテナーはふだん 1 日以内に返信
-
Add: KCM True crimeオープンapproved check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
triage: failed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
oxc-project/tsrs#1277 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ardia-browser/ardia#6798 ·
メンテナーはふだん 1 日以内に返信