From 118356ee5845cacf64cac262920dff5c577e9b2f Mon Sep 17 00:00:00 2001 From: Inverle Date: Mon, 30 Jun 2025 20:18:17 +0200 Subject: Fix cancellation of slider exit (#7705) Previously when you clicked the "Cancel" button inside of the confirm dialog, the slider would close anyway. --- p/scripts/extra.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'p/scripts/extra.js') 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(); } // -- cgit v1.2.3