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

Duotone in cover block slows scrolling when background is fixed #46470

Open
efu98 opened this issue Dec 12, 2022 · 5 comments
Open

Duotone in cover block slows scrolling when background is fixed #46470

efu98 opened this issue Dec 12, 2022 · 5 comments
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Bug An existing feature does not function as intended

Comments

@efu98
Copy link

efu98 commented Dec 12, 2022

Description

When adding the duotone effect on the background of a cover block, the background seems to move slower than the scroll.
I think I should be working the same as when there is no duotone effect ; there, the parallax effect works properly.

Step-by-step reproduction instructions

  1. Add a cover block with an image in the background
  2. Set one of the duotone colors combinations
  3. In the block settings, toggle on "Fixed Background" under Media Settings

Screenshots, screen recording, code snippet

Current behaviour (with duotone):
current

Expected behaviour (without duotone):
expected

Environment info

  • Wordpress version 6.1.1
  • Browsers : Firefox 107.0.1
  • Device : Macbook with macOS Catalina 10.15.7

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@efu98 efu98 changed the title Duotone in cover block slow scrolling when background is fixed Duotone in cover block slows scrolling when background is fixed Dec 12, 2022
@ndiego ndiego added Needs Testing Needs further testing to be confirmed. [Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Bug An existing feature does not function as intended labels Dec 13, 2022
@Mamaduka
Copy link
Member

This issue was reviewed in today's Editor Bug Scrub. I was able to confirm a similar issue with Firefox and TT3 themes. But the behavior looks okay in Chrome.

@ajlende, @matiasbenedetto, do you remember if there are any known browser issues with Duotone filters that can cause this behavior?

@annezazu annezazu removed the Needs Testing Needs further testing to be confirmed. label Dec 15, 2022
@ajlende
Copy link
Contributor

ajlende commented Jan 3, 2023

I know there are some issues with Safari that we've had to work around, but I use Firefox as my daily browser and haven't had any issues. The filter is computed on the fly, so especially high resolution images may cause issues on slower hardware because I think the cover block uses the full resolution image always, unlike the image block.

@ajlende
Copy link
Contributor

ajlende commented Feb 14, 2023

especially high resolution images may cause issues on slower hardware

Tested this with an 8k image to confirm and it looks like Firefox is not computing the filter on the source image, so the image size doesn't have an effect. It is, however, trying to recompute the filter when you scroll on every frame on the CPU which is still quite slow especially when the cover block is filling a large portion of the visible area.

@slambert
Copy link

I've seen this as jumpy/jitteryness on Firefox and it gets worse if you add more than one fixed background cover block.

@mikemcalister
Copy link

mikemcalister commented Sep 28, 2024

I can also confirm this is affecting Safari and Firefox, but it works ok in Chrome. In Safari and Firefox, the combination of duotone and fixed background causes sluggish scrolling.

For me, the issue is not related to high resolution images or slower hardware. I have optimized images and a maxed out MacBook Pro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Cover Affects the Cover Block - used to display content laid over a background image [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

7 participants