MicrosoftEdge / MicrosoftEdge/WebView2Feedback

Setting DefaultBackgroundColor on WebView2 affects Web add-ins

Open
#2,856 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description
We have a VSTO add-in that uses WebView2. Setting the DefaultBackgroundColor on the WebView affects any web add-in loaded later.

Version
SDK: 1.0.1293.44
Runtime: 105.0.1343.53
Framework: WinForms
OS: Win10 21H2

Repro Steps

  1. Install Web add-in that opens a simple page
  2. Run Sample add-in that sets a background color for the WebView (in this case, red)
  3. Verify the task pane created from the Sample add-in is open
  4. Open the Web add-in.
  5. Notice how the background is also red.

image
Notice how in the previous image the web add-in is red. That color was set by the VSTO add-in.

We provide a sample vsto add-in for Excel and a sample web-addin where the issue is easily verifiable.
The color is set in class Browser.designer.cs, line 38.

ExcelWebAddIn1Manifest.zip
SampleAddinWithWebView2.zip

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

Start with the provided ExcelWebAddIn1Manifest.zip and SampleAddinWithWebView2.zip, then inspect Browser.designer.cs at line 38 where the color is set. Run the listed repro steps in Excel and verify whether the VSTO add-in's DefaultBackgroundColor carries into the separately opened web add-in; done means the behavior is isolated and its expected ownership or fix path is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.