You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Repeater: confirm row removal with the editor's ConfirmDialog instead of window.confirm #132
Removing a repeater row asks for confirmation with the browser's own window.confirm() (src/blocks/components/fields/components/repeater.tsx, the blockstudio-repeater__remove control). Three things about that dialog:
It does not look like the editor. It is the plain browser dialog with the site URL as its title, while every other confirmation in the block editor (for example deleting a pattern or resetting styles) uses the ConfirmDialog from @wordpress/components.
It is modal for the whole tab. While it is open nothing else on the page runs, which also stops browser automation and end to end tests: a Playwright or Chrome DevTools session has to register a dialog handler before every row removal, otherwise the next command times out.
The texts are translatable already (textRemove, and textRemove: false skips the question), so only the presentation is the issue.
Suggestion: use __experimentalConfirmDialog from @wordpress/components with the same text, confirmButtonText "Delete" and the existing textRemove behavior. An alternative without any question would be to remove the row immediately and offer undo in a snackbar, the way the block editor handles removed blocks, but that is a bigger change.
If one of these fits, I am happy to send a pull request. It would touch the same row controls as #126 (accessible names for the row buttons), so I would base it on that branch or wait until #126 is merged, whichever you prefer.
Found while testing our blocks in the editor with Blockstudio 7.7.3.
Implemented on the unreleased 7.7.4 preparation branch in d1d9ef8. Repeater removal now uses WordPress’s ConfirmDialog with a Delete action, retaining custom textRemove questions and textRemove: false for immediate removal. Cancel/Escape preserve the row and restore focus. Nested dialog keyboard events cannot reorder parent rows. Added browser regression coverage for default/boolean/empty/custom questions, cancellation, keyboard confirmation, nested isolation, minimum rows and saved deletions, and updated docs/schema/changelog. Local PHP/client/static checks pass; full [all] CI is being run. Leaving this issue open until the release is merged and published.
Repeater removal now uses the editor's confirmation dialog with a Delete button. Custom text and textRemove: false are preserved. Browser regression tests cover Cancel/Escape focus return, keyboard activation, nested rows, minimum-row restrictions and saved deletion. Full CI and Distribution passed on the release commit.
Activity
Use editor repeater confirmations and show empty select state [all]
dnnsjsk commentedon Oct 16, 2026
Implemented on the unreleased 7.7.4 preparation branch in d1d9ef8. Repeater removal now uses WordPress’s ConfirmDialog with a Delete action, retaining custom textRemove questions and textRemove: false for immediate removal. Cancel/Escape preserve the row and restore focus. Nested dialog keyboard events cannot reorder parent rows. Added browser regression coverage for default/boolean/empty/custom questions, cancellation, keyboard confirmation, nested isolation, minimum rows and saved deletions, and updated docs/schema/changelog. Local PHP/client/static checks pass; full [all] CI is being run. Leaving this issue open until the release is merged and published.
dnnsjsk commentedon Oct 17, 2026
Released in Blockstudio 7.7.4, commit e1d38df.
Repeater removal now uses the editor's confirmation dialog with a Delete button. Custom text and textRemove: false are preserved. Browser regression tests cover Cancel/Escape focus return, keyboard activation, nested rows, minimum-row restrictions and saved deletion. Full CI and Distribution passed on the release commit.
Thanks for the report.