Review main Merged

85257[TASK] Avoid console error in hotkey module

Benjamin Franzke CR +2 V +2 Easy +2 −2 updated 10/03/24, 15:39

Commit message

Cope with the situation that a KeyboardEvent is not guaranteed
to provide a `key` property in the event struct. `key` will
be undefined if a input value is filled from a autocomplete list
in google chrome.

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
    • Guido Schmechel +1
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benjamin Franzke +2
    • Guido Schmechel +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1214

  1. Benjamin Franzke uploaded patch set 1 07/15/24, 07:31

  2. core-ci voted on patch set 1 V +1 07/15/24, 07:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/61573

  3. Andreas Kienast commented on patch set 1 07/15/24, 07:46

    hotkeys.ts:161

    I think it'd make sense to abort `findHotkeySetup()` if `key` is undefined.
  4. Benjamin Franzke commented on patch set 1 07/15/24, 09:34

    hotkeys.ts:161 Reply

    thought about that as well, but then I thought: What if we want to support sequences at some point, then this kind of event should stop the sequence, so it's "good" to report "something" (=passthrough undefined). But I don't care, we can also additionally check the value, afterwards, but this method needs to be explicit about the possibly undefined property (in order to have one less strictNullChecks, out of 2499 – see 67256: [WIP][TASK] Enable TypeScript strictNullChecks | https://review.typo3.org/c/Packages/TYPO3.CMS/+/67256 😁)
  5. Andreas Kienast commented on patch set 1 CR +1 09/24/24, 10:20

    hotkeys.ts:161 Reply

    Acknowledged
  6. Guido Schmechel commented on patch set 1 CR +1 V +1 10/03/24, 08:38

    Tested in the forms module via search field and with chrome
  7. Garvin Hicking voted on patch set 1 CR +1 V +1 10/03/24, 09:38

  8. Benjamin Franzke uploaded patch set 2 CR +1 V +1 10/03/24, 11:53

  9. Benjamin Franzke commented on patch set 2 10/03/24, 11:53

    Sorry, had to repush, since I was not aware that hotkey.ts was main only.
  10. core-ci voted on patch set 2 V +1 10/03/24, 11:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67007

  11. Garvin Hicking voted on patch set 2 CR +1 V +1 10/03/24, 13:43

  12. Guido Schmechel voted on patch set 2 CR +1 V +1 10/03/24, 14:10

  13. Benjamin Franzke voted on patch set 2 CR +2 V +2 10/03/24, 15:38

  14. Benjamin Franzke merged patch set 3 10/03/24, 15:39