MicrosoftEdge / MicrosoftEdge/WebView2Feedback
CapturePreview completion handler only fires when webview visible
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
CapturePreview returns S_OK but never calls the CapturePreviewCompletedHandler if:
a) put_IsVisible( FALSE ) has been called on the controller; or
b) WS_VISIBLE wasn't specified on the parent hWnd passed to CreateCoreWebViewController
This causes problems in headless use cases. Workaround is moving window offscreen but this can cause issues with accessibility tools like screen readers.
Version
SDK: 1.0.622.22
Runtime: Release runtime 86.0.622.51
Framework: Win32
OS: Win10 version 1909
Repro Steps
- Run WebView2APISample
- Choose Toggle Visibility from View menu to hide web view
- Choose Save Screenshot from File menu - the Save As dialog appears but the Preview Captured message box doesn't appear
- Wait a couple of minutes then choose Toggle Visibility from View menu to show the web view
- The CapturePreviewCompletedHandler now fires and the Preview Captured message box appears
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WebView2APISample and reproduce the issue using Toggle Visibility and Save Screenshot. Trace the CapturePreview call and its CapturePreviewCompletedHandler while the webview or parent window is hidden; done means the handler fires without making the webview visible.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100