The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update form-utils.ts
Steven Tey7073dae2d18d
diff --git a/apps/web/lib/form-utils.ts b/apps/web/lib/form-utils.tsindex 2398ec2a26..cc3f93ba3b 100644--- a/apps/web/lib/form-utils.ts+++ b/apps/web/lib/form-utils.ts@@ -1,7 +1,7 @@import { type ChangeEvent, type KeyboardEvent } from "react";export const handleMoneyKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {- // Allow: backspace, delete, tab, escape, enter, decimal point+ // Allow: backspace, delete, tab, escape, enter, decimal point, and CMD/CTRL+Aif (e.key === "Backspace" ||e.key === "Delete" ||@@ -12,7 +12,8 @@ export const handleMoneyKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {e.key === "ArrowRight" ||e.key === "ArrowUp" ||e.key === "ArrowDown" ||- (e.key === "." && !e.currentTarget.value.includes("."))+ (e.key === "." && !e.currentTarget.value.includes(".")) ||+ (e.key === "a" && (e.metaKey || e.ctrlKey)) // Allow CMD+A or CTRL+A) {return;}