Skip to content

A free, self-hostable news aggregator…

JavaScript form validation compatibility older browsers (#6777)

Alexandre Alapetite229c78b2e3be
diff --git a/p/scripts/extra.js b/p/scripts/extra.js
index 916f1618b..edc9edd95 100644
--- a/p/scripts/extra.js
+++ b/p/scripts/extra.js
@@ -277,7 +277,7 @@ function init_2stateButton() {
function init_configuration_alert() {
window.onsubmit = function (e) {
- window.hasSubmit = data_leave_validation(document.body, e.submitter ? e.submitter.form : null);
+ window.hasSubmit = data_leave_validation(document.body, e.target);
};
window.onbeforeunload = function (e) {
if (window.hasSubmit) {