Area screenshot reopens with the previous selection instead of a fresh one (macOS)
維護者通常 1 天內回覆
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 63/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- react, rust, tauri, typescript
研究方向
Start in target-select-overlay.tsx and trace how effectiveInitialAreaBounds and the cropper selection state are handled when an overlay is revealed. Then inspect the macOS close_target_select_overlay_windows and request_overlay_reveal paths to understand why the webview keeps its prior bounds. Done means a second screenshot starts with an empty selection unless remembering the area is explicitly enabled; the issue asks maintainers to choose between two approaches.
由索引模型根據 Issue 內容生成。
描述
Description
When I start an area screenshot, the selection overlay opens with my previous selection already drawn. Most of the time I want a new area, so I have to drag over or reset the old box first.
Reproduction
- Start an area screenshot and drag a region. Capture it.
- Start another area screenshot.
- The previous region is still drawn when the overlay appears.
Expected
Each area screenshot starts with an empty selection, unless I've explicitly asked Cap to remember the area.
Possible cause
Screenshot mode already looks like it's meant to start fresh. In target-select-overlay.tsx, effectiveInitialAreaBounds returns undefined when options.mode === "screenshot", and the padlock "lock selection" is limited to recording mode.
On macOS, though, close_target_select_overlay_windows hides the overlay window instead of closing it (it only calls close() on Windows). The next ShowCapWindow::TargetSelectOverlay finds the existing window and re-reveals it through request_overlay_reveal without reloading the webview, so the Cropper keeps its last bounds.
Suggestion
- Reset the crop when the overlay is revealed for a new screenshot session.
- If remembering the area is useful for screenshots too, make it opt-in by extending the padlock to screenshot mode: locked reuses the area, unlocked always starts fresh.
I'm happy to open a PR for this if a maintainer confirms which direction you'd prefer.
Environment
- Cap 0.6.0
- macOS 27.0.1, Apple M1 Pro
- 3 displays
- 主要語言
- Rust
- 星號
- 23.7k
- 分支
- 2.1k
- 平均合併
- 1 天 6 小時
- 30 天內合併 PR
- 705
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
CapSoftware/Cap 的其他 Issue
-
Web player intercepts ⌘⇧M and blocks Chrome profile-menu shortcut可能已有人在做 @AatmanAJ 於 12 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 80/100
CapSoftware/Cap#2596 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
CapSoftware/Cap#2384 · 2 則留言 ·
維護者通常 1 天內回覆
-
Dashboard pagination causes full page reloads on self-hosted Cap可能已有人在做 @Dewin 於 40 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
CapSoftware/Cap#2305 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
CapSoftware/Cap#1714 · 3 則留言 ·
維護者通常 1 天內回覆
-
Pending transcript saves discard later typing可能已有人在做 @AksharP5 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 35/100
CapSoftware/Cap#3502 · 1 則留言 ·
維護者通常 1 天內回覆
相似的 Issue
-
desktop documentation
難度 1/5 1 小時以內 新手友好度 90/100
vfarcic/dot-agent-deck#2008 ·
維護者通常 1 天內回覆
-
L: javascript
難度 2/5 1-3 小時 新手友好度 72/100
dependabot/dependabot-core#16744 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 68/100
nautechsystems/nautilus_trader#5486 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
Bump rustls-webpki, webpki-roots and webpki-root-certs for the emSign distrust (CVE-2026-111943)未關閉
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆