Commit a2b24cd1 authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Christian Kuhn
Browse files

[BUGFIX] SplitButtons: Abort click event if requested

If any callback is registered by `SplitButtons.addPreSubmitCallback()` and
requests to stop the event by `stopPropagation()`, the event must be
aborted and not only possibly stacked events.
Additionally, the `preventExec` flag gets reset.

Resolves: #82355
Related: #77942
Releases: master, 8.7, 7.6
Change-Id: Ib8478ef4c51915365c804c1c408b3fc16a13da0b
Reviewed-on: https://review.typo3.org/53968

Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Matthias Vogel's avatarMatthias Vogel <typo3@kanti.de>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d047b314
......@@ -58,6 +58,11 @@ define(['jquery', 'TYPO3/CMS/Backend/Icons'], function($, Icons) {
// Run any preSubmit callbacks
for (var i = 0; i < SplitButtons.preSubmitCallbacks.length; ++i) {
SplitButtons.preSubmitCallbacks[i](e);
if (e.isPropagationStopped()) {
preventExec = false;
return false;
}
}
$form.append($elem);
// Disable submit buttons
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment