From 0bfc6d7dc2733d2b606ecacaa66465c9ffca5891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Fri, 2 Jul 2021 14:26:51 +0200 Subject: [PATCH 1/3] Add to WidgetAreasBlockEditorProvider --- .../src/components/widget-areas-block-editor-provider/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/edit-widgets/src/components/widget-areas-block-editor-provider/index.js b/packages/edit-widgets/src/components/widget-areas-block-editor-provider/index.js index b9aeef8db1953..8048a3120ea86 100644 --- a/packages/edit-widgets/src/components/widget-areas-block-editor-provider/index.js +++ b/packages/edit-widgets/src/components/widget-areas-block-editor-provider/index.js @@ -13,6 +13,7 @@ import { useMemo } from '@wordpress/element'; import { BlockEditorProvider, BlockEditorKeyboardShortcuts, + CopyHandler, } from '@wordpress/block-editor'; import { ReusableBlocksMenuItems } from '@wordpress/reusable-blocks'; @@ -108,7 +109,7 @@ export default function WidgetAreasBlockEditorProvider( { useSubRegistry={ false } { ...props } > - { children } + { children } From 18e0f5acd4cb6837aaf64350294072ae53b508c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Fri, 2 Jul 2021 14:35:18 +0200 Subject: [PATCH 2/3] Add CopyHandler to SidebarBlockEditor --- .../components/sidebar-block-editor/index.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/customize-widgets/src/components/sidebar-block-editor/index.js b/packages/customize-widgets/src/components/sidebar-block-editor/index.js index 3ba3fa0b1799a..fa942694d51d6 100644 --- a/packages/customize-widgets/src/components/sidebar-block-editor/index.js +++ b/packages/customize-widgets/src/components/sidebar-block-editor/index.js @@ -14,6 +14,7 @@ import { BlockTools, BlockSelectionClearer, BlockInspector, + CopyHandler, ObserveTyping, WritingFlow, BlockEditorKeyboardShortcuts, @@ -114,15 +115,17 @@ export default function SidebarBlockEditor( { isFixedToolbarActive={ isFixedToolbarActive } /> - - - - - - - - - + + + + + + + + + + + { createPortal( // This is a temporary hack to prevent button component inside From 7f8179ded19c6798d2f0a0b564a6f381b0cb943e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Fri, 2 Jul 2021 17:29:26 +0200 Subject: [PATCH 3/3] Lint --- .../src/components/sidebar-block-editor/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/customize-widgets/src/components/sidebar-block-editor/index.js b/packages/customize-widgets/src/components/sidebar-block-editor/index.js index fa942694d51d6..34e38c01e86c4 100644 --- a/packages/customize-widgets/src/components/sidebar-block-editor/index.js +++ b/packages/customize-widgets/src/components/sidebar-block-editor/index.js @@ -120,7 +120,9 @@ export default function SidebarBlockEditor( { - +