generateblocks icon indicating copy to clipboard operation
generateblocks copied to clipboard

Advanced backgrounds bug

Open simkoG opened this issue 1 year ago • 0 comments

Description

There is a little bug with the Advanced Backgrounds feature. If you apply any advanced image as background after adding a simple background (with inline style enabled), the simple background overwrites the advanced background on the front end.

Steps to reproduce

  1. Insert container.
  2. Set up a simple background image (Backgrounds > Image URL).
  3. Toggle Use inline style -- important (I use inline style background images for lazy load backgrounds with JavaScript).
  4. Without removing the previously inserted image click on the Advanced toggle.
  5. Add two images: a) device: mobile, state: normal, target: self, any URL b) device: desktop, state: normal, target: self, any URL
  6. Close the Advanced background modal.
  7. Publish the page.
  8. Check the source of the generated container.

https://user-images.githubusercontent.com/10430702/207037021-5a59308d-77ac-42ce-ab24-67bc173b9e62.mp4

Expected behavior

The container should have the background image from Advanced Background.

Actual behavior

The container has the firstly added simple image as background.

When you use the Advanced Background feature, the simple background option disappears from the block editor. It cannot be modified until you disable the Advanced Background again, but the previously set value is still there.

References:

...


simkoG avatar Dec 12 '22 11:12 simkoG