Describe the bug
While the Expanded Editor is open, changing a field queues a block preview re-fetch. For as long as that fetch is in flight, all three ways of closing the panel stop working at the same time: the Done button, the Escape key, and clicking outside it. The panel also sets isDismissible: false, so there is no close icon to fall back on. Nothing indicates the panel is busy (Done has no spinner and no disabled styling), so it reads as frozen rather than working. On our blocks the window lasts between 0.4 and 4.5 seconds depending on how heavy the block's preview is.
To Reproduce
Steps to reproduce the behavior:
- Register an ACF v3 block from
block.json with a wysiwyg field (any block whose preview takes a moment to render server-side).
- Add the block to a page and open the Expanded Editor from the pencil in the block toolbar.
- Type into the wysiwyg, which queues a preview re-fetch.
- Immediately click Done - nothing happens.
- Press Escape - nothing happens.
- Click outside the panel - nothing happens.
- All three start working the moment the fetch resolves.
Expected behavior
At least one exit should work at all times. Either Done stays enabled and closes the panel, since the field values are already in the store by that point, or the busy state is made visible with a spinner or a genuinely disabled-looking button. The silent dropping of Escape and click-away is the most confusing part, as neither gives the editor any feedback at all.
Screenshots or Video
[attach a screen recording of clicking Done repeatedly with nothing happening]
Code
block.json:
{
"name": "acf/repro-expanded-editor",
"title": "Repro Expanded Editor",
"description": "Minimal block to reproduce the Expanded Editor close guard.",
"category": "widgets",
"icon": "edit",
"acf": {
"blockVersion": 3,
"mode": "preview",
"renderTemplate": "render.php"
},
"supports": { "anchor": true }
}
render.php:
<div class="repro-expanded-editor">
<?php the_field( 'body' ); ?>
</div>
Field group export:
{
"key": "group_6b0a1c2d3e4f5",
"title": "Repro Expanded Editor",
"fields": [
{
"key": "field_6b0a1c2d3e4f6",
"label": "Body",
"name": "body",
"type": "wysiwyg",
"tabs": "visual",
"media_upload": 0
}
],
"location": [
[
{ "param": "block", "operator": "==", "value": "acf/repro-expanded-editor" }
]
],
"active": true
}
Version Information:
- WordPress Version 7.1
- PHP Version 8.2.16
- ACF Version ACF PRO 6.8.7
- Browser [add yours]
Additional context
The relevant code is the Expanded Editor modal in assets/build/js/pro/acf-pro-blocks.min.js. Reading the minified bundle, four things are keyed to the same isFetchingBlock flag:
onRequestClose returns early while fetching with no validation errors, so click-away is dropped
- the Done button's
disabled prop is isFetchingBlock && !validationErrors
shouldCloseOnEsc is !isFetchingBlock || validationErrors
isDismissible is false
So for the duration of a fetch the modal has no exit at all. Guarding against closing mid-fetch is reasonable in itself; the problem is that every route is gated on one flag with no user-facing feedback.
In practice editors read it as a hang, click Done several times, and some reload the page and lose the edit. Our production blocks also set hideFieldsInSidebar and expandedEditorButtons: ["toolbar"], which is where we first hit this - the minimal repro above leaves them out, since the guards themselves don't reference either option.
Describe the bug
While the Expanded Editor is open, changing a field queues a block preview re-fetch. For as long as that fetch is in flight, all three ways of closing the panel stop working at the same time: the Done button, the Escape key, and clicking outside it. The panel also sets
isDismissible: false, so there is no close icon to fall back on. Nothing indicates the panel is busy (Done has no spinner and no disabled styling), so it reads as frozen rather than working. On our blocks the window lasts between 0.4 and 4.5 seconds depending on how heavy the block's preview is.To Reproduce
Steps to reproduce the behavior:
block.jsonwith a wysiwyg field (any block whose preview takes a moment to render server-side).Expected behavior
At least one exit should work at all times. Either Done stays enabled and closes the panel, since the field values are already in the store by that point, or the busy state is made visible with a spinner or a genuinely disabled-looking button. The silent dropping of Escape and click-away is the most confusing part, as neither gives the editor any feedback at all.
Screenshots or Video
[attach a screen recording of clicking Done repeatedly with nothing happening]
Code
block.json:{ "name": "acf/repro-expanded-editor", "title": "Repro Expanded Editor", "description": "Minimal block to reproduce the Expanded Editor close guard.", "category": "widgets", "icon": "edit", "acf": { "blockVersion": 3, "mode": "preview", "renderTemplate": "render.php" }, "supports": { "anchor": true } }render.php:<div class="repro-expanded-editor"> <?php the_field( 'body' ); ?> </div>Field group export:
{ "key": "group_6b0a1c2d3e4f5", "title": "Repro Expanded Editor", "fields": [ { "key": "field_6b0a1c2d3e4f6", "label": "Body", "name": "body", "type": "wysiwyg", "tabs": "visual", "media_upload": 0 } ], "location": [ [ { "param": "block", "operator": "==", "value": "acf/repro-expanded-editor" } ] ], "active": true }Version Information:
Additional context
The relevant code is the Expanded Editor modal in
assets/build/js/pro/acf-pro-blocks.min.js. Reading the minified bundle, four things are keyed to the sameisFetchingBlockflag:onRequestClosereturns early while fetching with no validation errors, so click-away is droppeddisabledprop isisFetchingBlock && !validationErrorsshouldCloseOnEscis!isFetchingBlock || validationErrorsisDismissibleisfalseSo for the duration of a fetch the modal has no exit at all. Guarding against closing mid-fetch is reasonable in itself; the problem is that every route is gated on one flag with no user-facing feedback.
In practice editors read it as a hang, click Done several times, and some reload the page and lose the edit. Our production blocks also set
hideFieldsInSidebarandexpandedEditorButtons: ["toolbar"], which is where we first hit this - the minimal repro above leaves them out, since the guards themselves don't reference either option.