Repository navigation
Group block no longer can be edited upon drag & drop in editor window #83399
Description
Description
This was reported by a user of our WordPress service where they would accidentally grab a group block within the editor window and move it (similar to trying to move blocks within the List View); however upon releasing their left mouse button the group block itself would become 'locked' and you could no longer select content within it including editing text within a paragraph block.
I have been able to replicate this error using our custom WordPress theme as well as the Twenty Twenty-Five theme in a local install, as well as on our servers.
There was a secondary issue that is harder to reproduce, which has the selected group block shrinking and remaining in that shrunken view. This is all reset upon doing a refresh of the browser window.
Step-by-step reproduction instructions
- Create content (specifcally, several paragraph blocks or use a pattern to add that content) and group it together. Set your group block Align setting to be Full width.
- Within the editor area, click the area of the group block outside of your text so you get the 'grab handle' hand icon. That will select the group block.
- Drag the group block around within your editor window and then release it. Please note that this isn't an exact science and it takes a few tries to bug it out. Once is sometimes not enough.
- Once you release your mouse button, check to see if you can select any content (such as text) within that group block, and attempt to add or delete a character.
- What you will experience when the bug hits is that that specific group block is no longer editable.
Screenshots, screen recording, code snippet
I have created a screen recording of recreating this bug using the WordPress Playground (https://playground.wordpress.net/).
https://mediaspace.wisc.edu/media/Group+Block+Bug/1_g8isdgwy
Environment info
- Using WordPress Playground (https://playground.wordpress.net/), which is using WordPress version 7.1.2.
- Using the Twenty Twenty-Five theme
- Using Microsoft Edge (Version 153.0.4234.48 (Official build) (64-bit)) - thought this has been recreated using Firefox and Chrome in most recent versions.
- Using Windows 11, though coworkers have also recreated it using MacOS.
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Activity
SainathPoojary commentedon Sep 23, 2026
Thanks for reporting the issue, I was able to reproduce this issue following the steps described as well.
Here is a screen recording demonstrating the behavior on my end: Video
Environment Tested:
dpmehta commentedon Sep 24, 2026
I looked into the issue and tried to find out the root cause for the issue and i am adding my findings below.
Root Cause Analysis: Group Block Paragraph Uneditable After Drag & Drop
When a user drags and drops a Group block, releases it after moving it around, and attempts to edit the inner paragraph, the paragraph and other inner content blocks become completely uneditable.
1. Comparison: Baseline (Working) vs. Bug (Reproduced) State
The table below compares two states: the first represents the clean state prior to bug reproduction, while the second illustrates the result after the bug has been reproduced (that is, following the drag and drop action).
isContentEditabletruefalse/ non-interactivecontenteditable"true""false"RichTextreceives inactive editing modeis-selectedpointer-eventsautonone(residual inline style or inherited)onDragStartsetspointerEvents = 'none'inover(), cleanup failsclassis-editing-disabledis-editing-disabledcontentOnlymode derived for non-content blockshas-editable-outline2. Detailed Root Cause Breakdown
The issue is caused by a combination of two distinct flaws in Gutenberg's drag-and-drop and section block architectures:
Cause 1: Direct DOM Mutation & Stale Cleanup in
onDragStart(The Residual Drag State Bug)The drag-and-drop mechanism in
use-selected-block-event-handlers.jsdirectly mutates DOM styles on the dragged block:gutenberg/packages/block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js
Lines 186 to 202 in 72e0cc4
The cleanup function
end()is registered on the iframe'sownerDocument:gutenberg/packages/block-editor/src/components/block-list/use-block-props/use-selected-block-event-handlers.js
Lines 259 to 279 in 72e0cc4
Why this breaks:
Stale Node Reference on Block Reorder:
When the block is dragged and dropped to another position ,
useOnBlockDropdispatchesmoveBlocksToPosition(). React re-renders the block tree.nodeinsideend()holds a reference to the previous DOM instance or stale DOM node.Missing
dragend/dropon Drag-Around:When the user moves the block around the canvas for 5–10 seconds and releases the mouse:
dropevent does not fire.dragendevent onownerDocumentis frequently missed or swallowed.No Cleanup in Hook Unmount:
useEventHandlersunmounts wheneverisSelected,isZoomOut, orhasMultiSelectionchanges. Its cleanup function only removeskeydown,dragstart, anddblclickfromnode. It never callsend()and never cleans up theownerDocumentlisteners or residual styles.Result:
node.style.pointerEvents = 'none'andnode.style.transform = 'scale(...)'remain permanently active on the block. Clicks pass completely through the element, making it impossible to click into the text or select inner blocks.Cause 2: Unsynced Pattern Section Trapping & Overlay Click Interception
Even when inline drag styles are restored, the block editor enters a Section Interaction Trap:
Pattern Detection as a Section:
In
private-selectors.js, any group withmetadata.patternNameis classified as a Section Block (isSectionBlock === true).Editing Mode Architecture for Unsynced Patterns:
In reducer.js
blockEditingMode: 'disabled'(is-editing-disabledwithpointer-events: none).blockEditingMode: 'contentOnly'.Click Interception by
useFlashEditableBlocks:In use-block-props/index.js, section blocks mount
useFlashEditableBlocksgutenberg/packages/block-editor/src/components/use-flash-editable-blocks/index.js
Lines 43 to 55 in 72e0cc4
At the start of
onDragStart,selection.removeAllRanges()completely destroys the browser text selection. After the drag operation, the outer pattern block is the selected block in the Redux store.Because the inner group container has
pointer-events: noneand the outer pattern intercepts clicks, single-clicking into the pattern merely triggers the section outline animation (has-editable-outline), preventing focus from landing directly on the paragraph'sRichTextelement. With no focus and no block selection, RichText renders withcontenteditable="false".Open for suggestions and confirmation regarding above findings.
Block editor: link the changelog entry to the pull request