mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-30 05:21:08 +00:00
Update forms.js
Now it works in the correct fields.
This commit is contained in:
parent
7c88f7081c
commit
e4892701d8
1 changed files with 9 additions and 4 deletions
|
@ -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
|
||||||
|
.querySelectorAll("[name='subjects']")
|
||||||
|
.forEach((node) => node.addEventListener("keypress",
|
||||||
|
function (event) {
|
||||||
if (event.keyCode == 13) {
|
if (event.keyCode == 13) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
))
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in a new issue