aboutsummaryrefslogtreecommitdiff
path: root/p/scripts/extra.js
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2024-10-18 09:05:49 +0200
committerGravatar GitHub <noreply@github.com> 2024-10-18 09:05:49 +0200
commit229c78b2e3bebec27248012074e4f43af0e6e482 (patch)
tree4b563f2e484d68b3637d178a29cd98f77944a896 /p/scripts/extra.js
parentb184dc26988dfedb88bca178013e1d1f211f14de (diff)
JavaScript form validation compatibility older browsers (#6777)
Restore compatibility with older browsers (e.g. Firefox and Chrome older than 2020) and simplify code at the same time https://developer.mozilla.org/en-US/docs/Web/API/SubmitEvent/submitter Contributes to https://github.com/FreshRSS/FreshRSS/issues/6776 Was introduced by https://github.com/FreshRSS/FreshRSS/pull/4370 (to be retested a bit more, though)
Diffstat (limited to 'p/scripts/extra.js')
-rw-r--r--p/scripts/extra.js2
1 files changed, 1 insertions, 1 deletions
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) {