Review 12.4 Merged

83441[BUGFIX] Stop event propagation when clicking icon in page tree

Andreas Kienast CR +2 V +2 Easy +3 −2 updated 03/12/24, 13:58

Commit message

With #103197, a loading indicator was added to the context menus.
However, due to the nature how the context menu component registers
itself, we run into conflicting event handling. We have to silent any
subsequent handlers on the same event, therefore the event propagation
is immediately stopped.

This aligns the event propagation behavior with the modernized tree in
TYPO3 v13.

Review

  • Code review CR +2 Done
    • Andreas Kienast +2
    • Benjamin Franzke +1
    • Oliver Hader +1
  • Verified V +2 Done
    • Andreas Kienast +2
    • Benjamin Franzke +1
    • Sven Juergens +1
    • Oliver Hader +1
    • core-ci +1 CI

Issues 2

Files 2

Review log 1518

  1. Andreas Kienast uploaded patch set 1 03/12/24, 12:18

  2. Oliver Hader commented on patch set 1 03/12/24, 12:22

    Same applies to event propagation on `file-list-action.ts`
  3. core-ci voted on patch set 1 V +1 03/12/24, 12:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54424

  4. Oliver Hader commented on patch set 1 03/12/24, 12:28

    I'd rather allow event propagation for `svg-tree` and `file-list-action` again for the `contextmenu` event.
  5. Oliver Hader commented on patch set 1 03/12/24, 12:28

    Reply

    Acknowledged
  6. Oliver Hader commented on patch set 1 03/12/24, 12:32

    Reply

    Forget that, I have to read the previous patch and problem to be solved carefully again...
  7. Andreas Kienast updated the commit message in patch set 2 V +1 03/12/24, 12:33

  8. Andreas Kienast updated the commit message in patch set 3 03/12/24, 12:36

  9. core-ci voted on patch set 2 V +1 03/12/24, 12:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54426

  10. Benjamin Franzke voted on patch set 3 CR +1 03/12/24, 12:40

  11. core-ci voted on patch set 3 V +1 03/12/24, 12:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/54428

  12. Oliver Hader commented on patch set 3 V +1 03/12/24, 12:42

    Works, but I cannot explain to myself why...
  13. Benjamin Franzke voted on patch set 3 V +1 03/12/24, 12:52

  14. Benjamin Franzke commented on patch set 3 03/12/24, 13:00

    Reply

    The issue is that context-menu has a global (left)click handler that does two things: * opening * closing The closing part is broken, as it is triggered in case the ContextMenu is opened by API (`ContextMenu.show()`) from a click-handler itself. In that case hideAll is called: https://github.com/TYPO3/typo3/blob/6055db0be52bb510617e41ebb16ead15a1c71712/Build/Sources/TypeScript/backend/context-menu.ts#L227 `stopImmediatePropagartion` prevents that and that's why it didn't broke it `main` We'd like to refactor the context-menu to handle the closing part in a separate event handler (later on), but for now this patch should streamline 12.4 with the current (working) state in 12.4
  15. Oliver Hader commented on patch set 3 CR +1 03/12/24, 13:16

    Reply

    Thx for the explanation! I compared that to the v13 implementation in `tree.ts`
  16. Sven Juergens voted on patch set 3 V +1 03/12/24, 13:44

  17. Andreas Kienast voted on patch set 3 CR +2 V +2 03/12/24, 13:58

  18. Andreas Kienast merged patch set 4 03/12/24, 13:58