[Problem/Bug]: Webview stays blank/stale after being made visible following creation while hidden — until an unrelated window interaction forces a repaint
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Tranquilla
- Ambito
- desktop, operating-systems
Direzione di ricerca
Inizia dal percorso di visibilità di CoreWebView2Controller, incluso put_IsVisible(TRUE), e dalla riproduzione di wry WebViewBuilder/set_visible descritta qui. Riproduci il problema con HWND figli nascosti adiacenti, quindi confronta le modifiche alla visibilità con i trigger di ridisegno elencati. Il lavoro sarà completato quando il contenuto apparirà immediatamente dopo che il controllo diventa visibile, senza un'interazione non correlata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What happened?
We host several CoreWebView2Controller instances as sibling child HWNDs inside one parent window (each acting as a "tab"), created with put_IsVisible(FALSE) and made visible later once the page has finished loading (CoreWebView2::NavigationCompleted / a wry PageLoadEvent::Finished equivalent).
After put_IsVisible(TRUE) is called, the control's own content is genuinely rendered (confirmed via visual inspection) but does not appear on screen — the region shows the parent window's background instead. This resolves itself automatically as soon as an unrelated interaction causes any repaint of the parent window (switching to a different already-visible tab and back, Alt-Tab, resizing).
We tried several application-side workarounds without success:
- waiting for the page load "Finished" event before calling put_IsVisible(TRUE)
- setting DefaultBackgroundColor to match our app's theme
- forcing a resize (shrink by 1px, then restore) immediately after showing the control, which reliably triggers WM_SIZE
None of these reliably force the compositor to actually present the already-rendered content. Only an unrelated external repaint trigger resolves it.
This looks related to MicrosoftEdge/WebView2Feedback#1412 ("Flash when using Multiple WebViews in Tab Controls"), which was closed with labels bug / priority-low / tracked, but describes the same underlying "control removed from/reinserted into a container, unformatted hole appears" symptom for the deactivation/reactivation case.
Importance
----Please select----
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
151.0.4129.78
SDK Version
1.0.3405
Framework
Other
Operating System
Windows 11
OS Version
26200.9168
Repro steps
- Create N sibling child HWND webviews inside a single parent window (e.g. via wry's WebViewBuilder targeting the same tao Window), each hidden with with_visible(false).
- For a given webview, navigate it and wait for PageLoadEvent::Finished (content is confirmed rendered internally).
- Call set_visible(true) on that webview.
- Observe: the region where the webview should now show its content instead shows the parent window's own background — the webview is logically visible but its content isn't presented.
- Switch focus/visibility to a different, already-visible sibling webview and back (or Alt-Tab away and back, or resize the window).
- The originally-stuck webview now shows its content correctly, with no further action.
Expected: content should be presented immediately after step 3.
Actual: content is only presented after an unrelated repaint trigger in step 5.
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
- Lingua principale
- PowerShell
- Stelle
- 526
- Fork
- 67
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MicrosoftEdge/WebView2Feedback
-
anhbaAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
MicrosoftEdge/WebView2Feedback#5731 ·
-
[Problem/Bug]: Runtime 153+: UI thread blocks ~33 s on every focus change when host app is the Windows shell (no Explorer)Forse già presa @ambikakunnath l’ha presa 2 giorni fa. Apertabug regression
MicrosoftEdge/WebView2Feedback#5730 · 1 assegnatario ·
-
[Problem/Bug]: PDF.js rendering regression in WebView2 Runtime 153.x causes vector point primitives to disappearForse già presa @ambikakunnath l’ha presa 3 giorni fa. Apertabug regression
MicrosoftEdge/WebView2Feedback#5729 · 2 commenti · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
MicrosoftEdge/WebView2Feedback#5728 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
MicrosoftEdge/WebView2Feedback#5727 ·
Tutte le issue di MicrosoftEdge/WebView2Feedback
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
[Desktop][Windows] Two Cline entries in Notifications Settings - PowerShell toast uses wrong AppIDAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
cline/cline#14594 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
nix-community/plasma-manager#670 ·
I maintainer di solito rispondono entro 7 giorni
-
bug has-stack-trace
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Nextcloud Desktop 34.0.4 fails TestLocalDiscovery::testFileOpenedAsDirectoryCompletesDiscoveryJob()Aperta0. Needs triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno