diff --git a/web/src/components/donate/DonateOptionsCard.svelte b/web/src/components/donate/DonateOptionsCard.svelte index 8380a73e..adf0de51 100644 --- a/web/src/components/donate/DonateOptionsCard.svelte +++ b/web/src/components/donate/DonateOptionsCard.svelte @@ -13,6 +13,7 @@ let customInput: HTMLInputElement; let customInputValue: number | null; + let customFocused = false; type Processor = "stripe" | "liberapay"; let processor: Processor = "stripe"; @@ -84,18 +85,31 @@
- e.key === 'Enter' && sendCustom()} - /> +
+ {#if customInputValue || customInput?.validity.badInput} + + $ + + {/if} + customFocused = true} + on:focus ={() => customFocused = true} + on:blur ={() => customFocused = false} + on:keydown={(e) => e.key === 'Enter' && sendCustom()} + /> +