MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Browser's print preview dialog window is not displayed for a hidden browser window control

Open
#3,361 4 comments 0 reactions 1 assignee View on GitHub

@monica-ch is already working on this.

Since Apr 7, 2023.

bug
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description

The browser's print preview dialog window is not displayed for a hidden browser window control.

It works as expected when using the system's print preview dialog.

Version

SDK: 1.0.1661.34
Runtime: Version 111.0.1661.62 (Official build) (64-bit)
Framework: WPF
OS: Windows 10 Enterprise x64 22H2 OS Build 19045.2728

Repro Steps

  1. Add a hidden browser control to a WPF window:
    <wv2:WebView2 Visibility="Hidden" x:Name="browserForPrinting" />

  2. Try to display the browser's print preview dialog:
    browserForPrinting.CoreWebView2.ShowPrintUI(CoreWebView2PrintDialogKind.Browser);

I expected the browser's print preview dialog to be displayed in a modal popup window.

It works as expected when using the system's print preview dialog:
browserForPrinting.CoreWebView2.ShowPrintUI(CoreWebView2PrintDialogKind.System);

image

Thank you.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.