Auto zoom becomes significantly smaller after switching tabs
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
- 領域
- frontend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 665
- フォーク
- 69
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 14
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quarto-dev/quarto のほかの issue
-
vscode
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
quarto-dev/quarto#1227 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug vscode
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
quarto-dev/quarto#1211 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quarto-dev/quarto#1139 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
quarto-dev/quarto#1138 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
quarto-dev/quarto#1137 ·
メンテナーはふだん 1 日以内に返信
quarto-dev/quarto の issue をすべて見る
似ている issue
-
api bug priority:low ready-for-agent
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
wondermoney/wondermoney#862 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
rootsiemen/seo-agent-tools#70 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
alvinunreal/oh-my-opencode-slim#1971 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
elecnix/bellwether#467 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信