Review main Abandoned

92505[BUGFIX] Fix live-search modal not opening via shortcut

Richard Krikler CR -1 V +1 Easy +5 −4 updated 01/30/26, 12:03

Commit message

The live-search modal can be opened via control-modifier-key+K.
After the info-modal of a record has been opened & closed,
the shortcut would not result in live-search opening anymore.

In TYPO3 v13 the dispatchEvent results in error:
"Uncaught TypeError: CustomEvent is not a constructor".
In TYPO3 v14 the dispatchEvent results in error:
"Uncaught TypeError:
 Cannot read properties of null (reading 'document')".

This is likely because of how/ when the shortcut gets bound to document.
An open info-modal displays an iframe in which another scope of
`document` exists. The registered shortcut now dispatches on this
`document`.
When the modal gets closed, the shortcut is still bound to the now
non-existent `document` of the iframe. Because the shortcut-binding is
not called again, `document` is null.

Registering the shortcut via class instantiation inside the
LiveSearch constructor, instead of only once on-import in live-search
.ts, fixes the issue.

Commands executed:
  ./Build/Scripts/runTests.sh -s build

Review

  • Code review CR -1
    • Oli Bartsch +1
    • Andreas Kienast -1
  • Verified V +1
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 67

  1. Richard Krikler uploaded patch set 1 01/25/26, 16:38

  2. core-ci voted on patch set 1 V +1 01/25/26, 16:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/94317

  3. Oli Bartsch voted on patch set 1 CR +1 V +1 01/26/26, 09:38

  4. Andreas Kienast commented on patch set 1 CR -1 01/30/26, 08:13

    I'm undecided here. This patch solves the imminent issue, but does not solve the _actual_ issie how hotkeys are bound.
  5. Oli Bartsch commented on patch set 1 01/30/26, 09:41

    Reply

    True, but this fixes the bug. However, are you about to investigate this further? Otherwise I suggest to just use this for now.
  6. Andreas Kienast commented on patch set 1 01/30/26, 10:49

    Reply Unresolved

    I'm currently working on another patch for the general issue.
  7. Andreas Kienast abandoned the change 01/30/26, 12:03

    Hey @typo3@richardkrikler.at, thank you very much for your patch. After investigating where the actual issue comes from, we've decided to come up with another approach that solves the issue on a more generic level. Feel free to check the new patch at https://review.typo3.org/c/Packages/TYPO3.CMS/+/92584.