mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-28 11:00:36 +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]")
|
||||
.forEach((node) => node.addEventListener("click", removeInput));
|
||||
|
||||
document.getElementById("id_description").addEventListener("keypress", function (event) {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
document
|
||||
.querySelectorAll("[name='subjects']")
|
||||
.forEach((node) => node.addEventListener("keypress",
|
||||
function (event) {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
});
|
||||
))
|
||||
|
||||
})();
|
||||
|
|
Loading…
Reference in a new issue