Issue Task Under Review Orphaned

#104964Column-selector-button and clipboard-panel reload the whole TYPO3-backend instead of just updating the content-frame

Ayke Halder 09/13/24, 16:32 updated 09/19/24, 19:49

Description

I’d like to refactor backend/column-selector-button and backend/clipboard-panel to implement a proper reload of the typo3-contentIframe instead of reloading the whole TYPO3-backend.

The proper reload can be done by using backend/viewport/content-container functions ContentContainer.setUrl(). This relies on backend/module/router and thereby triggers `NProgress` and gives this nice loading-bar above the typo3-contentIframe.

backend/viewport/content-container relies on backend/module/router and backend/module/iframe.

(I don’t know why ‘@ContentContainer.setUrl()@ does not make use of backend/module/router – but that is a new ticket.)

——

General issue with iframe reloads and anchors

An iframe (and also the main window) does not get reloaded if the new url contains an anchor and the old and new url are otherwise identical.
This must be fixed in and backend/module/iframe and and backend/viewport/content-container

——

Current implementation for ‘full backend reload’ in backend/column-selector-button

https://github.com/TYPO3/typo3/blob/35c9b96336d8644b52ef9045969a47475f559da5/Build/Sources/TypeScript/backend/column-selector-button.ts#L207-L209

// @todo This does not jump to the anchor (#t3-table-some_table) after the reload!!!
this.ownerDocument.location.href = this.modalTarget;
this.ownerDocument.location.reload();

E.g. go into the TYPO3-backend and open the dev-tools JS-console:
Iframes show the same behaviour as the main window.

/* First: login in to backend and load module */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups';

/* 1: this does not refresh anything */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#t3-table-be_groups';

/* 2: this does not refresh anything */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#t3-table-be_groups';

/* 3: this does neither refresh anything */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#';

/* 4 this triggers the complete reload - and that's how it is implemented in 'backend/column-selector-button' right now */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups#t3-table-be_groups';
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.reload();

/* 5: No anchor set - this always does a complete reload */
window.top.document.getElementById('typo3-contentIframe').ownerDocument.location.href = '/typo3/module/web/list?id=0&table=be_groups';

Reviews 1

History 26