aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Numpad.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/Numpad.svelte')
-rw-r--r--src/components/Numpad.svelte5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte
index 85f4b07f..a0c5260f 100644
--- a/src/components/Numpad.svelte
+++ b/src/components/Numpad.svelte
@@ -15,6 +15,10 @@
export let amountFiat = 0;
+ let pasted = async () => {
+ html = (await navigator.clipboard.readText()).replace(/,/g, "");
+ };
+
function getCurrencyInfo(locale = "en-US", currency) {
const formatter = new Intl.NumberFormat(locale, {
style: "currency",
@@ -207,6 +211,7 @@
use:focus
contenteditable
bind:innerHTML={html}
+ on:paste={pasted}
on:focus={select}
on:blur={blur}
on:input={input}