diff --git a/src/lib/components/billing/selectPaymentMethod.svelte b/src/lib/components/billing/selectPaymentMethod.svelte
index 937d6bc67..8e82a806e 100644
--- a/src/lib/components/billing/selectPaymentMethod.svelte
+++ b/src/lib/components/billing/selectPaymentMethod.svelte
@@ -140,6 +140,7 @@
diff --git a/src/lib/elements/forms/inputNumber.svelte b/src/lib/elements/forms/inputNumber.svelte
index 97835384e..dc3613644 100644
--- a/src/lib/elements/forms/inputNumber.svelte
+++ b/src/lib/elements/forms/inputNumber.svelte
@@ -24,11 +24,17 @@
let error: string;
onMount(() => {
- if (element && autofocus) {
- element.focus();
+ if (autofocus) {
+ addInputFocus();
}
});
+ export function addInputFocus() {
+ if (element) {
+ element.focus();
+ }
+ }
+
const handleInvalid = (event: Event) => {
event.preventDefault();
diff --git a/src/routes/(console)/organization-[organization]/billing/addCreditModal.svelte b/src/routes/(console)/organization-[organization]/billing/addCreditModal.svelte
index f0bb10ba9..4a66d6797 100644
--- a/src/routes/(console)/organization-[organization]/billing/addCreditModal.svelte
+++ b/src/routes/(console)/organization-[organization]/billing/addCreditModal.svelte
@@ -40,7 +40,12 @@
Apply Appwrite credits to your organization.
-
+
diff --git a/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte b/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte
index e76bcd2ed..c6b0d00fe 100644
--- a/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte
+++ b/src/routes/(console)/organization-[organization]/billing/budgetCap.svelte
@@ -84,6 +84,7 @@
{/if}
diff --git a/src/routes/(console)/project-[project]/auth/security/updatePasswordHistory.svelte b/src/routes/(console)/project-[project]/auth/security/updatePasswordHistory.svelte
index a308e9962..82209e2bb 100644
--- a/src/routes/(console)/project-[project]/auth/security/updatePasswordHistory.svelte
+++ b/src/routes/(console)/project-[project]/auth/security/updatePasswordHistory.svelte
@@ -8,6 +8,7 @@
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { project } from '../../store';
+ import { tick } from 'svelte';
let passwordHistory = $project?.authPasswordHistory < 1 ? 5 : $project?.authPasswordHistory;
let passwordHistoryEnabled = ($project?.authPasswordHistory ?? 0) !== 0;
@@ -34,6 +35,14 @@
trackError(error, Submit.AuthPasswordHistoryUpdate);
}
}
+
+ let maxSessionInputField: InputNumber | null = null;
+
+ $: if (passwordHistoryEnabled && maxSessionInputField) {
+ tick().then(() => {
+ maxSessionInputField.addInputFocus();
+ });
+ }