Fix block toolbar rendering

[MAILPOET-2610]
This commit is contained in:
Rostislav Wolny
2020-01-22 17:15:25 +01:00
committed by Jack Kitterhing
parent ec6b726d7b
commit f0611f9bf0
2 changed files with 8 additions and 7 deletions

View File

@@ -13,8 +13,8 @@
// There is no way to hide the delete button programmatically so we hide last toolbar that contains the delete option // There is no way to hide the delete button programmatically so we hide last toolbar that contains the delete option
// There is a feature request for adding that into Gutenberg https://github.com/WordPress/gutenberg/issues/16364 // There is a feature request for adding that into Gutenberg https://github.com/WordPress/gutenberg/issues/16364
// We also hide options to prevent removing Email or Submit when they are in multi-select // We also hide options to prevent removing Email or Submit when they are in multi-select
.wp-block[data-type='mailpoet-form/email-input'], .block-editor-block-contextual-toolbar[data-type='mailpoet-form/email-input'],
.wp-block[data-type='mailpoet-form/submit-button'], .block-editor-block-contextual-toolbar[data-type='mailpoet-form/submit-button'],
.is-multi-selected { .is-multi-selected {
.components-toolbar:last-child { .components-toolbar:last-child {
display: none; display: none;

View File

@@ -45,8 +45,8 @@ export default () => {
return ( return (
<DropZoneProvider> <DropZoneProvider>
<div className={layoutClass}> <SlotFillProvider>
<SlotFillProvider> <div className={layoutClass}>
<div className="edit-post-editor-regions__header"> <div className="edit-post-editor-regions__header">
<Header /> <Header />
</div> </div>
@@ -60,6 +60,7 @@ export default () => {
> >
<div className="edit-post-editor-regions__content"> <div className="edit-post-editor-regions__content">
<Notices /> <Notices />
<Popover.Slot name="block-toolbar" />
<UnsavedChangesNotice /> <UnsavedChangesNotice />
<BlockSelectionClearer className="edit-post-visual-editor editor-styles-wrapper"> <BlockSelectionClearer className="edit-post-visual-editor editor-styles-wrapper">
<BlockEditorKeyboardShortcuts /> <BlockEditorKeyboardShortcuts />
@@ -79,9 +80,9 @@ export default () => {
<Popover.Slot /> <Popover.Slot />
</BlockEditorProvider> </BlockEditorProvider>
</div> </div>
</SlotFillProvider> <FormStyles />
<FormStyles /> </div>
</div> </SlotFillProvider>
</DropZoneProvider> </DropZoneProvider>
); );
}; };