You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a transparent background WebView2, downloading sometimes breaks the transparency.
It happens quite often but it's not fully consistent. Sometimes it just blinks, other times it stays white until the window is resized or loses focus. I haven't tested whether other DefaultBackgroundColors are being overwritten with white.
Version
SDK: 1.0.774.44
Runtime: Evergreen 89.0.774.57
Framework: WinForms
OS: Win10
Repro Steps
using System;
using System.Windows.Forms;
using Microsoft.Web.WebView2.WinForms;
namespace WinFormsApp1
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
var form = new Form();
form.BackColor = System.Drawing.Color.HotPink;
WebView2 webView = new WebView2();
webView.Dock = DockStyle.Fill;
webView.DefaultBackgroundColor = System.Drawing.Color.Transparent;
AsyncInit(webView);
form.Controls.Add(webView);
Application.Run(form);
}
static async void AsyncInit(WebView2 webView)
{
await webView.EnsureCoreWebView2Async();
string html = "<html><body><a href='https://file-examples-com.github.io/uploads/2017/02/file_example_CSV_5000.csv'> Download file </a></body></html> ";
webView.CoreWebView2.NavigateToString(html);
}
}
}
Thanks @emimvi for the bug report and repro steps! I was able to see this locally. It looks related to the way the download bar is interacting with the rest of the content - it's probably adding a white background somewhere. When I dismiss the download bar it becomes transparent again. I've opened this bug on our backlog and we'll take a look. Thanks!
Description
When using a transparent background WebView2, downloading sometimes breaks the transparency.
It happens quite often but it's not fully consistent. Sometimes it just blinks, other times it stays white until the window is resized or loses focus. I haven't tested whether other DefaultBackgroundColors are being overwritten with white.
Version
SDK: 1.0.774.44
Runtime: Evergreen 89.0.774.57
Framework: WinForms
OS: Win10
Repro Steps
Screenshots
![PreDownload](https://user-images.githubusercontent.com/9382151/112194992-bbe6ee00-8c09-11eb-98f7-b50f941265a1.PNG)
![PostDownload](https://user-images.githubusercontent.com/9382151/112194983-b8ebfd80-8c09-11eb-9f2e-da0ee32aad0c.PNG)
Pre download:
Post download:
AB#32257764
The text was updated successfully, but these errors were encountered: