Skip to content

High performance self-hosted photo and video management solution.

fix(web): confirm button is disabled if two dialogs are shown subsequently (#10440)

Alexe8994d9ffd68
diff --git a/web/src/lib/components/shared-components/dialog/confirm-dialog.svelte b/web/src/lib/components/shared-components/dialog/confirm-dialog.svelte
index e5b35859f2..6acd819533 100644
--- a/web/src/lib/components/shared-components/dialog/confirm-dialog.svelte
+++ b/web/src/lib/components/shared-components/dialog/confirm-dialog.svelte
@@ -16,10 +16,7 @@
export let onCancel: () => void;
export let onConfirm: () => void;
- let isConfirmButtonDisabled = false;
-
const handleConfirm = () => {
- isConfirmButtonDisabled = true;
onConfirm();
};
</script>
@@ -37,7 +34,7 @@
{cancelText}
</Button>
{/if}
- <Button color={confirmColor} fullwidth on:click={handleConfirm} disabled={disabled || isConfirmButtonDisabled}>
+ <Button color={confirmColor} fullwidth on:click={handleConfirm} {disabled}>
{confirmText}
</Button>
</svelte:fragment>