Create fake placeholder

This commit is contained in:
Carlos Fernandez 2025-12-18 16:05:02 -05:00
parent ac727eb492
commit 0009357496
3 changed files with 8 additions and 1 deletions

View file

@ -248,6 +248,9 @@ export default function DHApplicationMixin(Base) {
input.addEventListener("keydown", event => {
if (event.key === "Enter") input.blur();
});
// Chrome sometimes add <br>, which aren't a problem for the value but are for the placeholder
input.addEventListener("input", () => input.querySelectorAll("br").forEach((i) => i.remove()));
}
}