diff options
| author | 2025-06-30 20:18:17 +0200 | |
|---|---|---|
| committer | 2025-06-30 20:18:17 +0200 | |
| commit | 118356ee5845cacf64cac262920dff5c577e9b2f (patch) | |
| tree | 4f4438740f7ca21381daac845ff9f3047917e10a /p | |
| parent | 32146bd8497ac367fc0df8d1cb4f768d9d1b0a6b (diff) | |
Fix cancellation of slider exit (#7705)
Previously when you clicked the "Cancel" button inside of the confirm dialog, the slider would close anyway.
Diffstat (limited to 'p')
| -rw-r--r-- | p/scripts/extra.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/p/scripts/extra.js b/p/scripts/extra.js index 59c9453cb..41e79ec6a 100644 --- a/p/scripts/extra.js +++ b/p/scripts/extra.js @@ -348,10 +348,9 @@ function close_slider_listener(ev) { if (data_leave_validation(slider) || confirm(context.i18n.confirmation_default)) { slider.querySelectorAll('form').forEach(function (f) { f.reset(); }); document.documentElement.classList.remove('slider-active'); - return true; - } else { - return false; + return; } + ev.preventDefault(); } // </slider> |
