Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CapturePreview completion handler only fires when webview visible #579

Open
dd8 opened this issue Oct 27, 2020 · 2 comments
Open

CapturePreview completion handler only fires when webview visible #579

dd8 opened this issue Oct 27, 2020 · 2 comments
Labels
bug Something isn't working priority-low We have considered this issue and decided that we will not be able to address it in the near future. tracked We are tracking this work internally.

Comments

@dd8
Copy link

dd8 commented Oct 27, 2020

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

  1. Run WebView2APISample
  2. Choose Toggle Visibility from View menu to hide web view
  3. Choose Save Screenshot from File menu - the Save As dialog appears but the Preview Captured message box doesn't appear
  4. Wait a couple of minutes then choose Toggle Visibility from View menu to show the web view
  5. The CapturePreviewCompletedHandler now fires and the Preview Captured message box appears

AB#29999309

@dd8 dd8 added the bug Something isn't working label Oct 27, 2020
@pagoe-msft pagoe-msft added the tracked We are tracking this work internally. label Oct 28, 2020
@pagoe-msft
Copy link

@dd8

Thanks for raising this issue, I've filed a bug for us to investigate.

@danielvandenberg95
Copy link

Issue also occurs when creating a window with HWND_MESSAGE as parent.

@github-actions github-actions bot added the priority-low We have considered this issue and decided that we will not be able to address it in the near future. label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low We have considered this issue and decided that we will not be able to address it in the near future. tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants