MicrosoftEdge / MicrosoftEdge/WebView2Feedback
[Problem/Bug]: Blank window after navigate in hidden state
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
What happened?
In our app, we are trying to start using WebView2 instead of CEF for displaying our main window's UI.
At app start, we show a splash screen, calling navigate and waiting for the navigate to complete. The browser window is hidden (SW_HIDE) while navigating. Once navigation is complete, we show the browser window (SW_SHOW). Result: its window is blank. It shows nothing. It also does not react on mouse clicks in any way (e.g. does not show context menus).
Is it an expected behavior? Can it be disabled then? What are possible workarounds?
Importance
Blocking. My app's basic functions are not working due to this issue.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
No response
SDK Version
No response
Framework
Win32
Operating System
Windows 10
OS Version
No response
Repro steps
You can easily reproduce this behavior on sample apps (e.g. Win32_GettingStarted). For this, you need to modify Win32_GettingStarted project code in the following way:
- Add a call to CoInitialize(0).
- Change ShowWindow's mode to SW_HIDE.
- Add NavigationCompleted handler and show window in it (SW_SHOW).
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
No, this never worked
Last working version (if regression)
No response
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 Win32_GettingStarted sample and reproduce the sequence involving CoInitialize, SW_HIDE, NavigationCompleted, and SW_SHOW. Inspect the window and navigation lifecycle around that sequence, then compare behavior with a visible window; done means identifying a supported workaround or documenting that the issue requires maintainer guidance.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100