diff --git a/packages/volto/news/6451.bugfix b/packages/volto/news/6451.bugfix new file mode 100644 index 0000000000..f4f9865d63 --- /dev/null +++ b/packages/volto/news/6451.bugfix @@ -0,0 +1 @@ +Moved `applyBlockDefaults` one component up so the style is computed correctly. @sneridagh diff --git a/packages/volto/src/components/manage/Blocks/Block/Edit.jsx b/packages/volto/src/components/manage/Blocks/Block/Edit.jsx index 19fd9a932e..6812152587 100644 --- a/packages/volto/src/components/manage/Blocks/Block/Edit.jsx +++ b/packages/volto/src/components/manage/Blocks/Block/Edit.jsx @@ -12,7 +12,6 @@ import cx from 'classnames'; import { setSidebarTab, setUIState } from '@plone/volto/actions'; import config from '@plone/volto/registry'; import withObjectBrowser from '@plone/volto/components/manage/Sidebar/ObjectBrowser'; -import { applyBlockDefaults } from '@plone/volto/helpers'; import { ViewDefaultBlock, EditDefaultBlock } from '@plone/volto/components'; import { @@ -199,7 +198,7 @@ export class Edit extends Component { {this.props.manage && ( { onInsertBlock, onSelectBlock, onMutateBlock, - data, + data: originalData, editable, properties, showBlockChooser, @@ -56,6 +57,8 @@ const EditBlockWrapper = (props) => { contentType, } = blockProps; + const data = applyBlockDefaults({ data: originalData, ...blockProps, intl }); + const visible = selected && !hideHandler(data); const required = isBoolean(data.required)