Auto zoom becomes significantly smaller after switching tabs
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, typescript
- Área
- frontend
Línea de trabajo
The Auto zoom resize handler lives in apps/vscode/assets/www/preview/index.js, where scaleFactor is computed from window.innerWidth and a 200 ms throttle flag gates resize events. Reproduce by moving the preview tab between editor groups and switching tabs, logging window.innerWidth in the handler. Done when the scale is recalculated after the timer expires or on the restoration resize, so it matches the visible width.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug description
This was detected when testing #1244 , but impacts normal Quarto Preview behavior on a released version.
Steps to reproduce
- Open a
.qmdfile in the editor. - Start Quarto: Preview. The preview opens in an editor group on the right.
- Confirm that Zoom: (Auto) is selected.
- Move the preview tab into the left editor group, alongside the source document.
- Switch to the source document tab.
- Switch back to the Quarto Preview tab.
Actual behavior
The preview content becomes significantly smaller after switching back to its tab.
Expected behavior
Auto zoom should calculate the scale from the preview’s current visible width. Moving the preview between editor groups or switching tabs should not leave it incorrectly scaled.
Additional observations
- Reproduced with the native Quarto extension in desktop VS Code
- Fixed zoom levels do not exhibit the issue.
- The issue was not observed in code-server.
Possible cause
The Auto zoom resize handler in apps/vscode/assets/www/preview/index.js calculates:
scaleFactor = Math.min(1, window.innerWidth / 1050);
It updates on the first resize event, then ignores further resize events for 200 ms. When the timer expires, it clears the throttle flag without recalculating the scale.
Moving or hiding a preview tab may temporarily give its webview a smaller viewport. If the handler captures that intermediate width and ignores the subsequent restoration event, the preview could retain an incorrectly reduced scale when shown again.
Steps to reproduce
No response
Actual behavior
No response
Expected behavior
No response
Your environment
No response
- Lenguaje dominante
- TypeScript
- Estrellas
- 665
- Forks
- 69
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 14
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 quarto-dev/quarto
-
vscode
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
quarto-dev/quarto#1227 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug vscode
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto#1211 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
quarto-dev/quarto#1139 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 90/100
quarto-dev/quarto#1138 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
quarto-dev/quarto#1137 ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto
Issues similares
-
api bug priority:low ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
wondermoney/wondermoney#862 ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
rootsiemen/seo-agent-tools#70 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
alvinunreal/oh-my-opencode-slim#1971 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
elecnix/bellwether#467 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día