Merge conflict Gerrit cannot merge this change. It needs a rebase onto main.

Review main Work in progress Quiet

79445[BUGFIX] Fix file selector not adding the file if opened from an iframe

Krzysztof Gutkowski CR 0 V 0 Easy +27 −3 updated 10/07/26, 14:18

Commit message

Currently, the element browser will generally assume that its parent
(ie. the window which wants to add an element somewhere and initiated
the browser) is the main list frame in the dashboard.

This isn't the case when the browser is opened from an already open
iframe, for instance:

* opening the information view of an image
* editing a record that references the image from the open iframe
* attempting to add another image to said record

In this case, the image won't be added to the record, since
ElementBrowser will send the insert event to the list frame instead
of the actual iframe that opened the browser.

This commit makes ElementBrowser check if theres more than one open
iframe, and determine the appropriate parent for the one currently
active, assuming its parent is the one directly below it.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/45/79445/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/45/79445/4 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote

Issues 1

Files 2

Review log 1113

  1. Krzysztof Gutkowski uploaded patch set 1 06/16/23, 13:32

  2. core-ci voted on patch set 1 V +1 06/16/23, 13:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/42743

  3. Benni Mack voted on patch set 1 CR +1 07/04/23, 20:03

  4. Susi Moog voted on patch set 1 V +1 CR +1 07/07/23, 10:47

  5. Andreas Kienast uploaded patch set 2 CR +1 V +1 07/07/23, 11:09

  6. Andreas Kienast voted on patch set 2 V +1 CR +1 07/07/23, 11:09

  7. core-ci voted on patch set 2 V +1 07/07/23, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43890

  8. Oli Bartsch commented on patch set 2 07/11/23, 09:02

    Unresolved

    This patch basically works, but since the modal to select the image is openend as new modal instance, which however does not get the focus, clicking the ESC key or clicking in the backdrop closes the initial opened modal and not the one in front. Te ESC key does not work on the new modal instance at all, even after focusing. This leads to a couple of side effect, e.g. adding an image will still not work when the overlayed modal was closed. Also having such duplicated backdrop looks odd.
  9. Benni Mack updated the commit message in patch set 3 CR +1 V +1 10/18/24, 14:10

  10. Benni Mack wrote 04/21/26, 15:00

    Removed reviewer Benni Mack.
  11. Benni Mack updated the commit message in patch set 4 04/22/26, 06:52

  12. Benni Mack commented on patch set 4 10/07/26, 14:18

    Unresolved

    This patch references an issue that was already used once (see https://git.typo3.org/typo3/typo3/-/commit/abed0c35d332de9ea3abfaa5e381fd10dcb32075). Please use a different / new issue, otherwise I will abandon this change
  13. Benni Mack marked it work in progress 10/07/26, 14:18