small annoyances

This commit is contained in:
Simon Martens
2026-01-12 19:23:41 +01:00
parent 7d7637fe13
commit 801c0a8da4
5 changed files with 90 additions and 61 deletions

View File

@@ -15,6 +15,11 @@ export class DuplicateWarningChecker extends HTMLElement {
const handler = this._createHandler(field);
this._boundHandlers.set(field, handler);
field.addEventListener("input", handler);
// Run initial check on page load only if field has a non-empty value
const initialValue = field.value ? field.value.trim() : "";
if (initialValue !== "") {
this._checkDuplicates(field);
}
});
}