Copy Plot at Custom Size does not copy in Firefox when the console is busy
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 4.4k
- Forks
- 207
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 308
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de posit-dev/positron
-
area: assistant area: ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
accessibility area: plots area: ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area: plots area: ui bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area: kernels lang: r
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
posit-dev/positron#17575 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Memory meter counts page cache as used memory under a cgroup limitPosiblemente ocupada @jmcphers la tomó hace 10 días. Abiertoarea: workbench bug memory-use support
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
posit-dev/positron#17414 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de posit-dev/positron
Issues similares
-
triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
novuhq/novu#13613 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement from-app needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
nightly-labs/openbot#23943 ·
Los mantenedores suelen responder en 1 día
-
comp/desktop desktop/chat P3 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
NousResearch/hermes-agent#164451 ·
Los mantenedores suelen responder en 1 día
-
shortkeys-2188:ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
crittermike/shortkeys#1121 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Doist/todoist-cli#742 ·