79555[BUGFIX] Use event delegation for image manipulation triggers
Commit message
Review
-
Code review CR +2 Done
- Andreas Kienast +2
- Thomas Hohn +1
- Markus Klein +1
- Oliver Hader +1
- Benni Mack +1
-
Verified V +2 Done
- Andreas Kienast +2
- Oliver Hader +1
- Benni Mack +1
- core-ci +1 CI
Issues 3
Files 2
Review log 1825
-
Andreas Kienast uploaded patch set 1 06/29/23, 06:20
-
Andreas Kienast updated the commit message in patch set 2 06/29/23, 06:21
-
core-ci voted on patch set 1 V +1 06/29/23, 06:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43098
-
core-ci voted on patch set 2 V +1 06/29/23, 06:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43099
-
Andreas Kienast uploaded patch set 3
V +106/29/23, 06:42 -
core-ci voted on patch set 3 V +1 06/29/23, 06:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43100
-
Andreas Kienast uploaded patch set 4
V +106/29/23, 07:12 -
core-ci voted on patch set 4 V +1 06/29/23, 07:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43101
-
Oliver Hader commented on patch set 4 06/29/23, 07:24
What about just bringing back the previous behavior - the jQuery `$.off` function ensured that the trigger was just registered once, e.g. like ``` public initializeTrigger(): void { // this initializer is created multiple times when adding new images if (this.triggerListener) { return; } this.triggerListener = new RegularEvent( 'click', (evt: Event, target: HTMLElement): void => { evt.preventDefault(); this.trigger = target; this.show(); }, this.abortEventListenerOptions ); this.triggerListener.delegateTo(document, '.t3js-image-manipulation-trigger'); } ``` -
Andreas Kienast commented on patch set 4 06/29/23, 07:29
Reply
Hm, I've added a `console.log()` in `initializeTrigger()` and the method gets called only once - for the image being added. Let's have a chat about this. -
Andreas Kienast uploaded patch set 5
V +106/29/23, 08:00 -
core-ci voted on patch set 5 V +1 06/29/23, 08:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43102
-
Oliver Hader uploaded patch set 6
V +106/29/23, 08:52 -
Oliver Hader voted on patch set 6 V +1 CR +1 06/29/23, 08:53
-
core-ci voted on patch set 6 V +1 06/29/23, 09:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43103
-
Jasmina Ließmann voted on patch set 6 V +1 06/29/23, 09:36
-
Oliver Hader commented on patch set 6 CR -1 06/29/23, 14:52
Another drive-by fix... -
Oliver Hader uploaded patch set 7
CR -1V +106/29/23, 14:55 -
Oliver Hader voted on patch set 7 V +1 CR +1 06/29/23, 14:55
-
core-ci voted on patch set 7 V +1 06/29/23, 15:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43117
-
Markus Klein voted on patch set 7 CR +1 06/30/23, 10:33
-
Thomas Hohn voted on patch set 7 CR +1 06/30/23, 10:36
-
Benni Mack voted on patch set 7 V +1 CR +1 07/03/23, 12:43
-
Andreas Kienast voted on patch set 7 V +2 CR +2 07/03/23, 16:03
-
Andreas Kienast merged patch set 8 07/03/23, 16:03