mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-02-25 06:09:48 +00:00
fix: lazy web component initialization
In some cases (probably slow internet) in place initialization can cause exception, because elements are not available yet. This commit moves events initialization to $()
This commit is contained in:
@@ -36,9 +36,6 @@
|
||||
<script>
|
||||
const loginModal = $("#login-modal");
|
||||
const loginForm = $("#login-form");
|
||||
loginModal.on("hidden.bs.modal", () => {
|
||||
loginForm.trigger("reset");
|
||||
});
|
||||
|
||||
const loginPasswordInput = $("#login-password");
|
||||
const loginUsernameInput = $("#login-username");
|
||||
@@ -77,4 +74,10 @@
|
||||
showHidePasswordButton.addClass("bi-eye");
|
||||
}
|
||||
}
|
||||
|
||||
$(() => {
|
||||
loginModal.on("hidden.bs.modal", () => {
|
||||
loginForm.trigger("reset");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user