Review 13.4 Merged

88965[BUGFIX] Register global keydown handler to close modals

Benni Mack CR +2 V +2 Easy +17 −11 updated 04/07/25, 18:54

Commit message

Usually, closing modal windows via pressing <ESC> works just fine as our
modals are based on Bootstrap. However, this may fail if a focussed
element within the modal is removed from the DOM, as the browser may
change the focus to the outer `body` element then.

To circumvent this, the Modal API will install a global `keydown`
handler that checks whether <ESC> was pressed and closes the modal then.
The event handler itself gets removed once the modal is finally closed.

Review

  • Code review CR +2 Done
    • Benni Mack +2
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 2

Review log 34

  1. Benni Mack commented on patch set 1 04/07/25, 17:25

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V +1 04/07/25, 17:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/77155

  3. Benni Mack voted on patch set 1 CR +2 V +2 04/07/25, 18:54

  4. Benni Mack merged patch set 2 04/07/25, 18:54