Skip to content

Application.Current.OpenWindow() creates a redundant instance of WebView #10436

@linkaiyu

Description

@linkaiyu

Description

if a window that has a contentpage that has a reference to a WebView as a member, when calling Application.Current.OpenWindow(), an additional instance of WebView is created by the runtime.

Steps to Reproduce

Here is a link to the repro:
https://github.com/xamcat/fid-protos/tree/main/src/repro_redundant_webview

Click the button "Click me to new WebView instance"
Observe one instance of WebView2 in Task Manager
When the WebView appears, click the button "Pop me up"
Observe the second instance of WebView2 in Task Manage

Link to public reproduction project repository

https://github.com/xamcat/fid-protos/tree/main/src/repro_redundant_webview

Version with bug

6.0.486 (current)

Last version that worked well

Unknown/Other

Affected platforms

I was not able test on other platforms

Affected platform versions

Windows SDK 10.0

Did you find any workaround?

no workaround

Relevant log output

No response

Metadata

Metadata

Assignees

Labels

area-controls-webviewWebViewfixed-in-7.0.100fixed-in-7.0.101fixed-in-7.0.81Look for this fix in 7.0.81!fixed-in-8.0.0-preview.1.7762Look for this fix in 8.0.0-preview.1.7762!p/1Work that is important, and has been scheduled for release in this or an upcoming sprintpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withplatform/windowst/bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions