Skip to content

fix(desktop): don't close picker webview before window screenshot - #2054

Open
oshtz wants to merge 1 commit into
CapSoftware:mainfrom
oshtz:fix/window-screenshot-picker-webview
Open

fix(desktop): don't close picker webview before window screenshot#2054
oshtz wants to merge 1 commit into
CapSoftware:mainfrom
oshtz:fix/window-screenshot-picker-webview

Conversation

@oshtz

@oshtz oshtz commented Jul 29, 2026

Copy link
Copy Markdown

Addresses #2046.

Problem

On Windows, selecting a window for a screenshot closed the target-picker webview before its takeScreenshot IPC call could be dispatched, so no screenshot was captured.

Fix

  • Keep the picker alive until the screenshot request is dispatched.
  • Close target-selection overlays after both successful and failed captures.
  • Keep overlay-cleanup failures from masking the original screenshot error.

Verification

  • Reproduced the failure on Windows 11 before the fix.
  • Confirmed a selected-window screenshot is written at the correct bounds and opens in the screenshot editor after the fix.
  • Scoped Biome check passes on the changed file.

Comment thread apps/desktop/src/routes/target-select-overlay.tsx
Comment thread apps/desktop/src/routes/target-select-overlay.tsx
Comment thread apps/desktop/src/routes/target-select-overlay.tsx Outdated
Keep the window screenshot picker alive until takeScreenshot is dispatched on Windows. Close target-selection overlays on every capture outcome without allowing cleanup failures to mask the original error.
@oshtz
oshtz force-pushed the fix/window-screenshot-picker-webview branch from 355d05c to 113201a Compare July 29, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant