Procházet zdrojové kódy

Fix cancellation of slider exit (#7705)

Previously when you clicked the "Cancel" button inside of the confirm dialog, the slider would close anyway.
Inverle před 10 měsíci
rodič
revize
118356ee58
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2 3
      p/scripts/extra.js

+ 2 - 3
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>