+ { blockNamesForPrompt.length === 1 ? (
+ { blockTypePromptMessages[ blockNamesForPrompt[ 0 ] ] }
+ ) : (
+
+ { blockNamesForPrompt.map( ( name ) => (
+ -
+ { blockTypePromptMessages[ name ] }
+
+ ) ) }
+
+ ) }
+
+ { _n(
+ 'Removing this block is not advised.',
+ 'Removing these blocks is not advised.',
+ blockNamesForPrompt.length
+ ) }
+
+
+
+
+
+
+ );
+}
diff --git a/packages/block-editor/src/components/copy-handler/index.js b/packages/block-editor/src/components/copy-handler/index.js
index 3881ff06f2bf3..3acaac367bd64 100644
--- a/packages/block-editor/src/components/copy-handler/index.js
+++ b/packages/block-editor/src/components/copy-handler/index.js
@@ -100,6 +100,11 @@ export function useClipboardHandler() {
return useRefEffect( ( node ) => {
function handler( event ) {
+ if ( event.defaultPrevented ) {
+ // This was likely already handled in rich-text/use-paste-handler.js.
+ return;
+ }
+
const selectedBlockClientIds = getSelectedBlockClientIds();
if ( selectedBlockClientIds.length === 0 ) {
@@ -127,7 +132,6 @@ export function useClipboardHandler() {
return;
}
- const eventDefaultPrevented = event.defaultPrevented;
event.preventDefault();
const isSelectionMergeable = __unstableIsSelectionMergeable();
@@ -197,10 +201,6 @@ export function useClipboardHandler() {
__unstableDeleteSelection();
}
} else if ( event.type === 'paste' ) {
- if ( eventDefaultPrevented ) {
- // This was likely already handled in rich-text/use-paste-handler.js.
- return;
- }
const {
__experimentalCanUserUseUnfilteredHTML:
canUserUseUnfilteredHTML,
diff --git a/packages/block-editor/src/components/inserter/library.js b/packages/block-editor/src/components/inserter/library.js
index 23dfdb7fd7dc6..3a814638c2f48 100644
--- a/packages/block-editor/src/components/inserter/library.js
+++ b/packages/block-editor/src/components/inserter/library.js
@@ -36,7 +36,8 @@ function InserterLibrary(
return {
destinationRootClientId: _rootClientId,
prioritizePatterns:
- getSettings().__experimentalPreferPatternsOnRoot,
+ getSettings().__experimentalPreferPatternsOnRoot &&
+ ! _rootClientId,
};
},
[ clientId, rootClientId ]
diff --git a/packages/block-editor/src/components/list-view/branch.js b/packages/block-editor/src/components/list-view/branch.js
index 785e6a538f715..d3b555c055afd 100644
--- a/packages/block-editor/src/components/list-view/branch.js
+++ b/packages/block-editor/src/components/list-view/branch.js
@@ -91,6 +91,7 @@ function ListViewBranch( props ) {
selectedClientIds,
level = 1,
path = '',
+ isBranchDragged = false,
isBranchSelected = false,
listPosition = 0,
fixedListWindow,
@@ -167,7 +168,8 @@ function ListViewBranch( props ) {
);
const isSelectedBranch =
isBranchSelected || ( isSelected && hasNestedBlocks );
- const showBlock = isDragged || blockInView || isSelected;
+ const showBlock =
+ isDragged || blockInView || isSelected || isBranchDragged;
return (