[BUGFIX] Use event delegation for image manipulation triggers
With the dismissal of jQuery and jQuery UI from the image manipulation component, the event handling for the trigger button ("Open Editor") got borked as the event state toggling previously done via `.off(...).on(...)` was replaced with using a `signal` as documented at [1]. The `AbortController` instance is only built when the modal has been fully shown, way after the event handling took place, breaking the module's global state. To solve this issue we removed the `AbortController` and its usages again. Also, `initializeTrigger()` now uses event delegation to register the event handler on the trigger buttons. As a drive-by fixes, the `active` state of the ratio buttons is now properly toggled, and the ratio title field is correctly updated by comparing with the scoped `ratioTitleWindow.HTMLElement` prototype. [1] https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#add_an_abortable_listener Resolves: #101150 Resolves: #101199 Related: #100948 Releases: main, 12.4 Change-Id: I021c74bb67976468ebdc5226263c6441796bd65b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/79555 Reviewed-by:Thomas Hohn <tho@gyldendal.dk> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org>
Showing
Please register or sign in to comment