MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Webview on transparent WPF regions does not hittest.

Open
#997 11 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description
When WPF window has Allow Transparency and no style (completely transparent window).
And WebView2 is on window region where no other controls are visible (i.e. Panel hosting WebView2 are background transparent / opacity 0).
And WebView2 content is visible (though it may have opacity).
Clicks on WebView2 will pass through WebView2, not trigger webview2 content events, and activate desktop UI beneath the window.

Expectation would be that the WPF hit test takes into account WebView2's visible painted areas.
Ideal would also treat non-painted areas as pass-through.

Version
SDK: 1.0.790-prerelease
Runtime: Version 90.0.809.0
Framework: WPF, C#, XAML
OS: Windows 10 Pro Version 20H2 OS build 19042.804 Windows Feature Experience Pack 120.2212.551.0

Additional context
With the new DefaultBackgroundColor allowing transparency I have successfully rendered WebView2 content in a transparent window with alpha blending/composition on the desktop. The bug above however means that there can be no interaction with the content as the entire control is not hittested even for the areas of the control which are visible.

Re-enabling window background, or having other wpf controls visible behind or in-front of the webview2 will suddenly make the webview2 receive hittest in the regions where the other controls overlap.

AB#31911566

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.

Research direction

No source files or tests are identified in the report. Start by reproducing the transparent WPF window scenario described with WebView2, then compare hit testing with and without a visible WPF background or overlapping control; done means visible WebView2 content receives clicks while transparent areas retain the intended pass-through behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.