Fix cancellation of slider exit (#7705)

Previously when you clicked the "Cancel" button inside of the confirm dialog, the slider would close anyway.
This commit is contained in:
Inverle authored and GitHub committed 2025-06-30 20:18:17 +02:00
1 parent 32146bd849
commit 118356ee58
1 file changed
+2 -3
+2 -3
View File
@@ -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>