#111526Contextual edit sheet cancels the navigation that closes it after a save
Description
Problem
A navigation of the content frame that starts in the contextual record edit sheet after the record was saved there sometimes ends in the page module instead of the target. The sheet closes, the content frame stays on (or returns to) the page module.
Steps to reproduce
- Open the page module and edit a content element in the contextual edit sheet.
- Change a field and save in the sheet.
- Click the button to open the full edit view in the sheet header.
- The sheet closes; intermittently the page module is shown instead of the full edit view.
Cause
Build/Sources/TypeScript/backend/element/contextual-record-edit-trigger.ts, setupMessageHandling(): on typo3:editform:navigate the sheet closes, and its typo3-modal-hidden handler calls ContentContainer.refresh() when the record was saved in the sheet. refresh() reloads the document the content frame still shows (location.reload()), which cancels the navigation that closed the sheet.
Suggested fix
--- a/Build/Sources/TypeScript/backend/element/contextual-record-edit-trigger.ts
+++ b/Build/Sources/TypeScript/backend/element/contextual-record-edit-trigger.ts
if (event.data?.actionName === 'typo3:editform:navigate') {
closeConfirmed = true;
+ navigated = true;
modal.hideModal();
...
- if (topWindow.TYPO3?.Backend?.ContentContainer) {
+ // A navigation loads the content frame anew, and a reload would cancel it
+ if (!navigated && topWindow.TYPO3?.Backend?.ContentContainer) {
topWindow.TYPO3.Backend.ContentContainer.refresh();
}Reviews 1
History 01
-
Gerrit Code Review pushed patch set 1 for main to change 97872 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-21T18:44:11+00:00" > 11/21/26, 18:44 </span>