A free, self-hostable news aggregator…
Fix JS for statistics repartition select form (#2896)
Alexandre Alapetitef2e0f051aa52
diff --git a/p/scripts/extra.js b/p/scripts/extra.jsindex 9ce0e74ce..86ee61542 100644--- a/p/scripts/extra.js+++ b/p/scripts/extra.js@@ -163,9 +163,13 @@ function init_select_observers() {const opt = s.options[s.selectedIndex],url = opt.getAttribute('data-url');if (url) {- s.form.querySelectorAll('[type=submit]').forEach(function (b) {- b.disabled = true;- });+ s.disabled = true;+ s.value = '';+ if (s.form) {+ s.form.querySelectorAll('[type=submit]').forEach(function (b) {+ b.disabled = true;+ });+ }location.href = url;}};