MarvellousSuspender
MarvellousSuspender copied to clipboard
Blinking white background when switching tabs
Please complete the following information when submitting a feature request or bug report.
- Extension version: v7.1.6.2
- Browser name & version: Chrome 99.0.4844.51
- Operating system & version: macOS 12.2.1
When switching between suspended tabs I see a bright flash before each suspended.html page is loaded. This is usually fine, but in the evenings with dim lights around me they become quite noticeable.
Would it be possible to have a dark default background before content is loaded? Providing a video explaining the issue, but be aware there's blinking!
https://user-images.githubusercontent.com/2993240/158669588-2979e869-1b33-493c-91c3-120af07dc444.mov
I've had this happen when I had the settings for "Apply Chrome's built-in memory-saving when suspending" turned on. I'm worried it might be an issue on Google's/Chrome's side.
Does this still happen on a new version of Chrome? I can't reproduce this with Apply Chrome's built-in memory-saving when suspending
turned on, with Version 100.0.4896.60
.
I was able to make the feature work a bit better for my own use-case where the system theme matches the extension theme.
Wrapping the body of suspended.html in an inner div with hide-initially class, then proceed to set a default background of the body based on your system theme.
suspended.html
- <body class="suspended-page hide-initially">
+ <body class="hide-initially">
+ <div class="newbody suspended-page hide-initially">
...
+ </div>
</body>
suspended.css
+ @media (prefers-color-scheme: dark) {
+ body.hide-initially {
+ background: #222;
+ }
+ }
- body .hide-initially {
+ .newbody .hide-initially {
+ display: none !important;
+ }
/* change "body" to ".newbody" for the rest of the file */
@Technetium1 I haven't tested the latest version yet, was just playing around with the CSS of the suspended page right now. Will reload and try again asap.
EDIT: Reloaded latest version of Chrome and I still experience the issue.
I was coming to suggest the @media (prefers-color-scheme: dark) {
solution too. I wonder if it could be that CSS files are render blocking and so while it waits the 25ms (in my quick test) for the CSS to load (it is in browser as part of the extension, no real download) we get the white until it stops blocking and renders. Putting the CSS, or at least the main background color CSS inline could potentially help with the blink of white.
Expieriencing the white blinks in dark mode too on Mac exactly as in the reported video. Did anyone test if the inlined CSS solves the problem?
Has the possibility of Chrome's theme causing this been eliminated?