You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Problem Description
Currently, when a BrowserView is on top of another BrowserView, the background view still displays its content over the foreground one, given that the FG browserview doesn't have a css-defined background color.
The blue is the background color of the foreground BrowserView (set via view.setBackgroundColor()), and the red - of the background view. The text is in the red view, but is displayed over the blue view, because the blue view has the background only set by view.setBackgroundColor() and not css.
Proposed Solution
It would be nice to be able to have a BrowserView.prototype.setOpaque(isOpaque: boolean) function that will tell Electron to render the BrowserView over everything else (respecting its z-position on the window, of course).
An alternative way to solving this is just to render the background color of BrowserView above all the "lower" BrowserViews, covering them. But some people might actually rely on that functionality, so, perhaps, it's not the best solution.
Basically, with view.setOpaque(true), it should look something like this:
Alternatives Considered
Of course, the obvious solution is to set the background-color: white, or something non-transparent in the css of the BrowserView (that's how I made the second screenshot), however, BrowserViews are usually used to display external (and unknown) content, and you will either add background-color: white and affect non-transparent pages, or affect transparent pages by doing nothing.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Problem Description
Currently, when a
BrowserView
is on top of anotherBrowserView
, the background view still displays its content over the foreground one, given that the FG browserview doesn't have a css-defined background color.The blue is the background color of the foreground
BrowserView
(set viaview.setBackgroundColor()
), and the red - of the background view. The text is in the red view, but is displayed over the blue view, because the blue view has the background only set byview.setBackgroundColor()
and not css.Proposed Solution
It would be nice to be able to have a
BrowserView.prototype.setOpaque(isOpaque: boolean)
function that will tell Electron to render theBrowserView
over everything else (respecting its z-position on the window, of course).An alternative way to solving this is just to render the background color of
BrowserView
above all the "lower"BrowserViews
, covering them. But some people might actually rely on that functionality, so, perhaps, it's not the best solution.Basically, with
view.setOpaque(true)
, it should look something like this:Alternatives Considered
Of course, the obvious solution is to set the
background-color: white
, or something non-transparent in the css of theBrowserView
(that's how I made the second screenshot), however,BrowserView
s are usually used to display external (and unknown) content, and you will either addbackground-color: white
and affect non-transparent pages, or affect transparent pages by doing nothing.Additional Information
No response
The text was updated successfully, but these errors were encountered: