Auto zoom becomes significantly smaller after switching tabs
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
- Nửa 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
- Lĩnh vực
- frontend
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 665
- Fork
- 69
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 quarto-dev/quarto
-
vscode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
quarto-dev/quarto#1227 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug vscode
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
quarto-dev/quarto#1211 ·
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 84/100
quarto-dev/quarto#1139 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
quarto-dev/quarto#1138 ·
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 88/100
quarto-dev/quarto#1137 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quarto-dev/quarto
Issue tương tự
-
api bug priority:low ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
wondermoney/wondermoney#862 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
rootsiemen/seo-agent-tools#70 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alvinunreal/oh-my-opencode-slim#1971 ·
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 77/100
elecnix/bellwether#467 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ 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