From def2be4a10cd446657f82cc12ca00c77f6132045 Mon Sep 17 00:00:00 2001 From: Aryeh Harris Date: Fri, 29 Sep 2023 14:34:29 -0400 Subject: [PATCH 1/4] Auto select all text in input on focus --- src/components/Faucet/FaucetRequestButton.tsx | 1 + src/components/Faucet/FaucetToInputRequest.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Faucet/FaucetRequestButton.tsx b/src/components/Faucet/FaucetRequestButton.tsx index c1310ae..32f1e21 100644 --- a/src/components/Faucet/FaucetRequestButton.tsx +++ b/src/components/Faucet/FaucetRequestButton.tsx @@ -258,6 +258,7 @@ export default function FaucetRequestButton({ value={amount} disabled={disabled} onChange={updateAmount} + onFocus={e => e.target.select()} /> diff --git a/src/components/Faucet/FaucetToInputRequest.tsx b/src/components/Faucet/FaucetToInputRequest.tsx index 00b0706..3b28b0c 100644 --- a/src/components/Faucet/FaucetToInputRequest.tsx +++ b/src/components/Faucet/FaucetToInputRequest.tsx @@ -37,9 +37,10 @@ export default function FaucetToInputRequest({ type="text" placeholder="tz1..." id={inputId} - onChange={handleInput} className={inputClass} disabled={status.isLoading} + onChange={handleInput} + onFocus={(e) => e.target.select()} /> Invalid address From 866f4a947506ca5dcd584f0a3c82e14793cbae1f Mon Sep 17 00:00:00 2001 From: Aryeh Harris Date: Fri, 29 Sep 2023 14:55:05 -0400 Subject: [PATCH 2/4] Expand slider to take up full row --- src/components/Faucet/FaucetRequestButton.tsx | 46 +++++++++---------- 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/src/components/Faucet/FaucetRequestButton.tsx b/src/components/Faucet/FaucetRequestButton.tsx index 32f1e21..6ae3f27 100644 --- a/src/components/Faucet/FaucetRequestButton.tsx +++ b/src/components/Faucet/FaucetRequestButton.tsx @@ -226,31 +226,29 @@ export default function FaucetRequestButton({ /> - - - Select Tez Amount - - - {minTez} - - - - - + Select Tez Amount + + + {minTez} + - - {maxTez} - - + + - + + {maxTez} + + + + + e.target.select()} + onFocus={(e) => e.target.select()} /> - +