gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Changing the text color of multiple blocks also changes the background color

Open t-hamano opened this issue 3 years ago • 10 comments

Description

Might be related to #50045

My understanding is that if you select multiple blocks of the same block, you can change the global style in the block sidebar all at once. However, it seems that if one global style is changed, the other global styles are updated with the one from one block.

At least, it seems to occur with color panels.

Step-by-step reproduction instructions

  • Insert multiple paragraph blocks (or multiple heading blocks, etc.).
  • Make each block a different background color.
  • Select all blocks.
  • Change text color.
  • Confirm that the background color of all blocks is updated to the same color.

Screenshots, screen recording, code snippet

https://github.com/WordPress/gutenberg/assets/54422211/5a75b1b4-f26b-4a4e-9542-e81e335421da

Environment info

No response

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

t-hamano avatar Jun 17 '23 09:06 t-hamano

I am able to confirm and I'm adding this issue as a regression. This did not occur in 6.2.

ndiego avatar Jun 20 '23 12:06 ndiego

In 6.2 changing colors on multiple blocks has unexpected effects if the background colors are a mix of preset and custom values (presets and gradients stay the same but the custom values disappear altogether)

https://github.com/WordPress/gutenberg/assets/8096000/6231e6e5-6b1c-465e-bc19-9dd04c34e2a7

Also on 6.2, if all the colors are set to custom values, they all change to the same value:

https://github.com/WordPress/gutenberg/assets/8096000/5542d34d-96d7-43db-827d-b8106e542e5f

It's not exactly the same as 6.3, because on 6.3 all colors change to the same, whether they are preset or custom:

https://github.com/WordPress/gutenberg/assets/8096000/71806902-c6d7-42d0-b844-b0cba574162d

tellthemachines avatar Jul 21 '23 02:07 tellthemachines

Good sleuthing @tellthemachines. Given the issues you found in 6.2, and the fact that this is a fairly minor bug, I think it's fine to punt for 6.3.

ndiego avatar Jul 24 '23 11:07 ndiego

This problem occurs in other cases as well. Perhaps changing one style may cause the related styles to be overwritten by all the styles in one block.

For example, select multiple group blocks with different border-color, border-width, and border-style applied. If you change the border-radius value, border-color, border-width, and border-style all change.

https://github.com/WordPress/gutenberg/assets/54422211/5d9e818c-2f70-4b30-aec8-fb0869d75b32

t-hamano avatar Jul 27 '23 13:07 t-hamano

We were wondering if this bug is related to:

  • https://github.com/WordPress/gutenberg/issues/52646

A note for future debuggers on this issue, I don't believe it is. I tested by disabling CSS optimization in the style engine and I could still reproduce the bug reported in this issue on trunk.

ramonjd avatar Jul 28 '23 01:07 ramonjd

I can confirm this bug/regression is still happening with Gutenberg trunk (Gutenberg Nightly v-16.8.20230915 as well.

https://github.com/WordPress/gutenberg/assets/39980/b0bb6bb2-b573-4a02-aedd-0b07666d6dc5

bph avatar Sep 15 '23 07:09 bph

After a review by core editor triage leads and core editor tech leads, this has been removed from the board for 6.5 consideration.

annezazu avatar Feb 08 '24 02:02 annezazu

I can confirm this bug/regression is still appears in Gutenberg Version 22.5.0-rc.1 and WordPress Version 6.9.1 version.

https://github.com/user-attachments/assets/75e9d1b5-9f2b-4ff8-b80d-9396663c83b6

dpmehta avatar Feb 12 '26 18:02 dpmehta

From today's bug scrub session:

This is a bug detected on WP 6.3 that is still happening on WP 6.9.1 Nobody seems to be working on this bug. I've punted it to WP 7.1 on the WordPress 7.0 Editor Tasks

juanmaguitar avatar May 07 '26 15:05 juanmaguitar

This issue has been a long-standing problem, so it does not need to be fixed in the 7.1 release. Let's remove this issue from the project board.

t-hamano avatar Aug 06 '26 13:08 t-hamano