Update forms.js

Now it works in the correct fields.
This commit is contained in:
Jascha Urbach 2022-12-19 23:57:00 +01:00
parent 7c88f7081c
commit e4892701d8
No known key found for this signature in database
GPG key ID: A43A844B114F9B08

View file

@ -47,9 +47,14 @@
.querySelectorAll("[data-remove]") .querySelectorAll("[data-remove]")
.forEach((node) => node.addEventListener("click", removeInput)); .forEach((node) => node.addEventListener("click", removeInput));
document.getElementById("id_description").addEventListener("keypress", function (event) { document
if (event.keyCode == 13) { .querySelectorAll("[name='subjects']")
event.preventDefault(); .forEach((node) => node.addEventListener("keypress",
function (event) {
if (event.keyCode == 13) {
event.preventDefault();
}
} }
}); ))
})(); })();