MicrosoftEdge / MicrosoftEdge/WebView2Feedback
Setting DefaultBackgroundColor on WebView2 affects Web add-ins
Nobody has claimed this yet.
- 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
- Install Web add-in that opens a simple page
- Run Sample add-in that sets a background color for the WebView (in this case, red)
- Verify the task pane created from the Sample add-in is open
- Open the Web add-in.
- Notice how the background is also red.

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.
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 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