Closed
Description
- Electron version: 0.37.5
- Operating system: Windows 10
Hi! Here's a minimal Electron app to reproduce the bug: electron-webview-resize-bug.zip
- Run the app
- Click the button to hide the webview
- Resize window
- Click the button again to show webview
- Bug: Notice the webview hasn't been resized (if you resize the window now then the bug disappears)
Actual use case where I hit the bug: tabbed UI with hidden <webview>
s for non-active tabs.
Bonus bug found while creating the testcase:
- Remove the
<script>...</script>
tag inindex.html
- Launch the app
- Bug: The webview doesn't show up at all.
- Try reloading with
Ctrl+R
, still doesn't show up - Open devtools with
Ctrl+Shift+I
. - Try realoding with
Ctrl+R
, notice the webview shows up.
The absence of a script / not having the devtools open seems to prevent the webview from showing? ¯_(ツ)_/¯
Activity
xywz commentedon Apr 11, 2016
Can confirm.
The bonus bug is a duplicate of #1117.
christoth commentedon Apr 12, 2016
webview
has issues being hidden or usingdisplay: none;
. It causes the behaviour you're seeing here as well as reloading the current page when un-hidden, as opposed to just becoming visible again.The
webview
and childbrowserplugin
object occupy the correct dimensions in your testcase, it's just thebrowserplugin
is not rendering to fill its updated dimensions, cause because thewebview
was hidden.If the best workaround, is to set the
webview
CSS to{ width: 0px; height: 0px; flex: 0 1; }
. This will effectively hide it, and not cause the adverse side effects ofdisplay: none;
/hidden
electron-webview-resize-bug-workaround.zip
I will update the
webview
documentation to make note of this behaviour and the workaround.evertonfraga commentedon Oct 7, 2016
Just to make sure: any news on this subject?
thanks
hideMode
add new option 'visibility' react-toolbox/react-toolbox#1089craxal commentedon Sep 25, 2017
I notice something similar happens when you change the zoom level of the shell and the webview's contents. When zooming in, while the webview element itself fills it's parent content, the content with the webview contracts.
sofianguy commentedon Jan 30, 2018
Thanks for contributing!
This is an old version that we are no longer releasing bug fixes for. We prefer to only keep issues that are on our immediate radar.
If you are still having the same issue in an up-to-date version, feel free to reach out and we'll reopen.
21 remaining items