aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/extra.js
diff options
context:
space:
mode:
authorGravatar Inverle <inverle@proton.me> 2025-06-30 20:18:17 +0200
committerGravatar GitHub <noreply@github.com> 2025-06-30 20:18:17 +0200
commit118356ee5845cacf64cac262920dff5c577e9b2f (patch)
tree4f4438740f7ca21381daac845ff9f3047917e10a /p/scripts/extra.js
parent32146bd8497ac367fc0df8d1cb4f768d9d1b0a6b (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/scripts/extra.js')
-rw-r--r--p/scripts/extra.js5
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>