}
});
+ // Hide the password when the form is being submitted to prevent
+ // it from being stored within the web browser's autocomplete list.
+ // see https://github.com/WoltLab/WCF/issues/4554
+ input.form?.addEventListener("submit", () => {
+ if (input.type !== "password") {
+ toggle(input, button, icon);
+ }
+ });
+
if (activeElement === input) {
input.focus();
}
});
}
function initElement(input) {
+ var _a;
_knownElements.add(input);
const activeElement = document.activeElement;
const inputAddon = document.createElement("div");
toggle(input, button, icon);
}
});
+ // Hide the password when the form is being submitted to prevent
+ // it from being stored within the web browser's autocomplete list.
+ // see https://github.com/WoltLab/WCF/issues/4554
+ (_a = input.form) === null || _a === void 0 ? void 0 : _a.addEventListener("submit", () => {
+ if (input.type !== "password") {
+ toggle(input, button, icon);
+ }
+ });
if (activeElement === input) {
input.focus();
}