ui: fix automatic slug generation

This commit is contained in:
Jens Langhammer 2020-02-24 12:40:16 +01:00
parent dc5ba144f1
commit 8433b5e583

View file

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