WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.39k stars 4.15k forks source link

Console warning on cover block color change #28366

Closed ajlende closed 3 years ago

ajlende commented 3 years ago

Description

Console error when using the cover block

Warning: Updating a style property during rerender (backgroundColor) when a conflicting property is set (background) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.

Step-by-step reproduction instructions

  1. Create a cover block
  2. Adjust the color

Expected behaviour

No console error

Actual behaviour

Full Error

``` Warning: Updating a style property during rerender (backgroundColor) when a conflicting property is set (background) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values. in div (created by CoverEdit) in CoverEdit (created by WithInstanceId(CoverEdit)) in WithInstanceId(CoverEdit) (created by (WithInstanceId(CoverEdit))) in (WithInstanceId(CoverEdit)) (created by _class) in _class (created by WithColors((WithInstanceId(CoverEdit)))) in WithColors((WithInstanceId(CoverEdit))) (created by WithDispatch(WithColors((WithInstanceId(CoverEdit))))) in WithDispatch(WithColors((WithInstanceId(CoverEdit)))) (created by Edit) in Edit (created by WithToolbarControls(Edit)) in WithToolbarControls(Edit) (created by WithInspectorControl(WithToolbarControls(Edit))) in WithInspectorControl(WithToolbarControls(Edit)) (created by WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))) in WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))) (created by WithToolbarControls(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))) in WithToolbarControls(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))) in Unknown (created by WithDispatch(Component)) in WithDispatch(Component) in Unknown (created by WithMultipleValidation(WithToolbarControls(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit)))))) in WithMultipleValidation(WithToolbarControls(WithInspectorControl(WithInspectorControl(WithToolbarControls(Edit))))) (created by WithFilters(Edit)) in WithFilters(Edit) (created by BlockEdit) in BlockEdit (created by BlockListBlock) in BlockCrashBoundary (created by BlockListBlock) in BlockListBlock (created by (BlockListBlock)) in (BlockListBlock) (created by ((BlockListBlock))) in ((BlockListBlock)) (created by WithFontSizeInlineStyles(((BlockListBlock)))) in WithFontSizeInlineStyles(((BlockListBlock))) (created by WithFilters(BlockListBlock)) in WithFilters(BlockListBlock) (created by IfCondition(WithFilters(BlockListBlock))) in IfCondition(WithFilters(BlockListBlock)) (created by WithDispatch(IfCondition(WithFilters(BlockListBlock)))) in WithDispatch(IfCondition(WithFilters(BlockListBlock))) in Unknown (created by Pure(WithSelect(WithDispatch(IfCondition(WithFilters(BlockListBlock)))))) in Pure(WithSelect(WithDispatch(IfCondition(WithFilters(BlockListBlock))))) (created by Items) in Items (created by BlockListItems) in BlockListItems (created by BlockList) in div (created by BlockList) in BlockList (created by VisualEditor) in div (created by WritingFlow) in WritingFlow (created by VisualEditor) in div (created by VisualEditor) in div (created by VisualEditor) in VisualEditor (created by Layout) in div (created by ForwardRef(InterfaceSkeleton)) in div (created by ForwardRef(InterfaceSkeleton)) in div (created by ForwardRef(InterfaceSkeleton)) in div (created by ForwardRef(InterfaceSkeleton)) in ForwardRef(InterfaceSkeleton) (created by Layout) in Layout (created by Editor) in ErrorBoundary (created by Editor) in BlockEditorProvider in Unknown (created by Context.Consumer) in WithRegistryProvider(BlockEditorProvider) (created by EditorProvider) in BlockContextProvider (created by EditorProvider) in EntityProvider (created by EditorProvider) in EntityProvider (created by EditorProvider) in EditorProvider in Unknown (created by Context.Consumer) in WithRegistryProvider(EditorProvider) (created by Editor) in DropZoneContextProvider (created by Editor) in SlotFillProvider (created by SlotFillProvider) in SlotFillProvider (created by Editor) in StrictMode (created by Editor) in Editor ```

WordPress information

Device information

stokesman commented 3 years ago

I've tested and can no longer reproduce this with the plugin built from master and I'm pretty sure the changes in #28565 are what resolved it.