Skip to content
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

Cover Image with fixed background causes Problems in Chrome #9619

Closed
derweili opened this issue Sep 4, 2018 · 6 comments
Closed

Cover Image with fixed background causes Problems in Chrome #9619

derweili opened this issue Sep 4, 2018 · 6 comments
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Feature] Media Anything that impacts the experience of managing media General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended

Comments

@derweili
Copy link
Contributor

derweili commented Sep 4, 2018

Describe the bug
When using the cover image with a fixed background the image is not always shown correctly in chrome. Sometimes it is not visible and sometimes only a part is visible.

To Reproduce
Steps to reproduce the behavior:

  1. Use Chrome 67, WP 4.9.8 and Gutenberg 3.7.0
  2. Add a Cover Image Block to a post
  3. Activate "Fixed Background"
  4. The Image is not completely visible

This error exists both in the backend and in the frontend

This does not happen with all Images.

Expected behavior
The image should be completely visible

Screenshots

The image is only partly visible:

bildschirmfoto 2018-09-04 um 22 58 45

Here a Video for better understanding:

ezgif-4-2073639eb6

Desktop :

  • OS: macOS 10.13.3
  • Browser Chrome
  • Version 67

Additional context
I think this bug has something to do with the bug described here:
https://stackoverflow.com/questions/20268962/fixed-attachment-background-image-flicker-disappear-in-chrome-when-coupled-with

The following CSS Code fixes this bug:
.wp-block-cover-image.has-parallax{ will-change: top; }

@ianbelanger79 ianbelanger79 added [Type] Bug An existing feature does not function as intended General Interface Parts of the UI which don't fall neatly under other labels. [Feature] Media Anything that impacts the experience of managing media Browser Issues Issues or PRs that are related to browser specific problems labels Sep 5, 2018
@mtias mtias added the Needs Design Feedback Needs general design feedback. label Oct 8, 2018
@karmatosed
Copy link
Member

If we can get the same visual but with a browser fix, then yes let's get this done. Design wise it shouldn't change how looks.

@karmatosed karmatosed removed the Needs Design Feedback Needs general design feedback. label Oct 8, 2018
@colorful-tones
Copy link
Member

I've tested and reproduced the issue in Chrome 67 on macOS 10.13 in BrowserStack. I also tested Chrome 66, 68, and 69, Safari 11.1, Firefox 59, 60, 61, 62 with macOS 10.13. The bug is unique to Chrome 67 only.

I confirmed that will-change: top; does fix the issue in Chrome 67.

However, MDN Docs for will-change states the following:

The spec doesn't define the behavior of particular value, but it is common for transform to be a compositing layer hint. Chrome currently takes two actions, given particular CSS property idents: establish a new compositing layer or a new stacking context.

While using top for the will-change value works. It seems arbitrary. I recommend using transform, which is still arbitrary, but just a little less arbitrary :)

@jasmussen
Copy link
Contributor

Given we're at Chrome 71 now, and I can't reproduce it, can we close this ticket?

Very sorry this did not receive a review sooner, it's been pretty hectic these past few months. For context, I recall trying to fix probably the same issue #2872 way back. I also remember this being fixed upstream, see discussion #2872 (comment).

@colorful-tones
Copy link
Member

colorful-tones commented Feb 8, 2019

I just tested on Chrome 71.0.3578.98 macOS 10.14.3 WP 5.0.3 and I was no longer able to reproduce this.

cover-image-fixed-test

@jasmussen
Copy link
Contributor

Cool. Closing this for now, we can reopen if issues arise again.

@colorful-tones
Copy link
Member

Further context... I did some more testing and verified this was not an issue. Please see: #11608 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Feature] Media Anything that impacts the experience of managing media General Interface Parts of the UI which don't fall neatly under other labels. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants