Skip to content

Cover block: adding duotone with a fixed background causes lag in Safari + Firefox #46470

Open

Description

@efu98

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

Activity

  1. changed the title [-]Duotone in cover block slow scrolling when background is fixed[/-] [+]Duotone in cover block slows scrolling when background is fixed[/+] on Dec 12, 2022
  2. added
    Needs TestingNeeds further testing to be confirmed.
    [Block] CoverAffects the Cover Block - used to display content laid over a background image
    [Type] BugAn existing feature does not function as intended
    on Dec 13, 2022
  3. Mamaduka commented on Dec 13, 2022

    @Mamaduka
    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?

  4. ajlende commented on Jan 3, 2023

    @ajlende
    Contributor

    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.

  5. reopened this on Jan 3, 2023
  6. ajlende commented on Feb 14, 2023

    @ajlende
    Contributor

    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.

  7. slambert commented on Apr 30, 2024

    @slambert

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

  8. mikemcalister commented on Sep 28, 2024

    @mikemcalister

    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.

  9. annezazu commented on Sep 25, 2026

    @annezazu
    Contributor

    Doubling back on this and it's still a bit laggy in 7.1.2 and GB 24.0. It's substantially better than what I can see from this original report but still not as smooth as Chrome.

    Safari

    safari.mov

    Chrome

    chrome.mov
  10. changed the title [-]Duotone in cover block slows scrolling when background is fixed[/-] [+]Cover block: adding duotone with a fixed background causes lag in Safari + Firefox[/+] on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] CoverAffects the Cover Block - used to display content laid over a background image[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions