ui: fix automatic slug generation

This commit is contained in:
Jens Langhammer 2020-02-24 12:40:16 +01:00
parent dc5ba144f1
commit 8433b5e583
1 changed files with 1 additions and 1 deletions

View File

@ -49,6 +49,6 @@ document.querySelectorAll("input[name=name]").forEach((input) => {
input.addEventListener("input", (e) => { input.addEventListener("input", (e) => {
const form = e.target.closest("form"); const form = e.target.closest("form");
const slugField = form.querySelector("input[name=slug]"); const slugField = form.querySelector("input[name=slug]");
slugField.value = convertToSlug(slugField.value); slugField.value = convertToSlug(e.target.value);
}); });
}); });