-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<webview> not rendering content after reload or redirect (Electron 5.x, 6.x) #18177
Comments
Found the same behavior on my application. Looking for a fix. Update Reproduction |
same problem. Looking for a fix |
It doesn't work on MacOS either |
We just updated to 5.0.1 and our webview no longer renders, either. However, adjusting css doesn't seem to restore it for us. Additionally, the webview's "dom-ready" event never fires. |
@javan are you seeing this with the above repro on 5 and 6? i'm not able to reproduce it with the above on macOS. |
@codebytere, I haven't tried the above repro, but the issue happening in our (Basecamp) app and preventing us from upgrading to Electron v5. I managed to narrow down reproduction steps to a fairly minimal test case. I suspect the problem occurs when dynamically created To reproduce, run: https://github.com/javan/electron-quick-start/tree/webview-iframe-bug
At this point, the |
Note: The above example doesn't reload or redirect the |
So, I just did some checking, and this issue appears to have been fixed in v6.0.0-beta.2. Not entirely sure what fixed it, but I don't seem to be getting the original issue when running the code on Electron Fiddle. |
@Catlinz could you please close this issue, if it has been fixed already? |
Preflight Checklist
Issue Details
Expected Behavior
When creating a webview with
src="http://mail.google.com
", I expect it to load and show the google login page. When reloading the webview (or if the webview redirects e.g., when logging in) I expect it to also properly render the page.Actual Behavior
Sometimes when loading the above URL, nothing is visible. Always when reloading the webview with the above URL, the webview will no longer render the page. E.g., signing into things like gmail, isn't really working because it signs you in, but you end up with a non-rendering webview.
To Reproduce
Replace the renderer process script in electron quickstart / electron fiddle with the following, and click the refresh button (with
webviewTag: true
in webPreferences).Screenshots
What it renders (usually) when first loaded (and what should be rendered):
What renders after the "REFRESH" button is clicked:
Additional Information
The webview (and iframe within it) still have their proper sizes. The page within the webview is actually loading correctly, if you inspect it you can see all the page is there.
If you change CSS properties in the dev tools that cause the webview to be re-rendered, the page then renders correctly. (e.g., after reloading and getting the blank page, if you toggle the
display: flex;
CSS property on the webview, the page will render. Just resizing the window that the webview is in does not cause the page to render.It seems to be affecting all Electron versions from 5.0.0-beta.1 and onward.
The text was updated successfully, but these errors were encountered: