| β¦ | β¦ | @@ -128,10 +286,26 @@ export const make = Effect.gen(function* () { | |
| 300 | + | }; | |
| 301 | + | // A screenshot holds focus only once its turn starts, not while queued behind another. | |
| 302 | + | return method === "Page.captureScreenshot" | |
| 303 | + | ? takeScreenshot(tab, relay, (current) => | |
π High preview/DesktopBrowserHost.ts:303
A queued screenshot from a detached viewer still starts and can leave the guest focused and painting indefinitely if the capture never settles. takeScreenshot checks only whether the relay is still current, so dropSessionHolds cannot invalidate that queued callback; invalidate queued work for the detached owner or check its lifetime before starting the hold.
π Reply "fix it for me" or copy this AI Prompt for your agent:
| 1 | In file @apps/desktop/src/preview/DesktopBrowserHost.ts around line 303: |
| 2 | |
| 3 | A queued screenshot from a detached viewer still starts and can leave the guest focused and painting indefinitely if the capture never settles. `takeScreenshot` checks only whether the relay is still current, so `dropSessionHolds` cannot invalidate that queued callback; invalidate queued work for the detached owner or check its lifetime before starting the hold. |