Skip to content
Snippets Groups Projects
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: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: default avatarMatthias Vogel <typo3@kanti.de>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent d047b314
Branches
Tags
No related merge requests found
...@@ -58,6 +58,11 @@ define(['jquery', 'TYPO3/CMS/Backend/Icons'], function($, Icons) { ...@@ -58,6 +58,11 @@ define(['jquery', 'TYPO3/CMS/Backend/Icons'], function($, Icons) {
// Run any preSubmit callbacks // Run any preSubmit callbacks
for (var i = 0; i < SplitButtons.preSubmitCallbacks.length; ++i) { for (var i = 0; i < SplitButtons.preSubmitCallbacks.length; ++i) {
SplitButtons.preSubmitCallbacks[i](e); SplitButtons.preSubmitCallbacks[i](e);
if (e.isPropagationStopped()) {
preventExec = false;
return false;
}
} }
$form.append($elem); $form.append($elem);
// Disable submit buttons // Disable submit buttons
......
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