From 67830d280cd914d63a978058e596961657e3dc86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Fri, 6 Sep 2024 11:22:38 +0200 Subject: [PATCH] fix: keyboard submit type (#89) * fix: config * fix: add keyboard submit type * fix: use cross-platform selectionColor instead of android-only cursorColor --- components/DualCurrencyInput.tsx | 3 ++- components/ui/input.tsx | 2 +- pages/receive/Receive.tsx | 1 + pages/send/LNURLPay.tsx | 1 + pages/send/Send.tsx | 1 + pages/settings/FiatCurrency.tsx | 1 + pages/settings/address-book/NewAddressBookEntry.tsx | 2 ++ pages/settings/wallets/LightningAddress.tsx | 1 + pages/settings/wallets/NewWallet.tsx | 1 + pages/settings/wallets/RenameWallet.tsx | 1 + 10 files changed, 12 insertions(+), 2 deletions(-) diff --git a/components/DualCurrencyInput.tsx b/components/DualCurrencyInput.tsx index d954e32..b18958d 100644 --- a/components/DualCurrencyInput.tsx +++ b/components/DualCurrencyInput.tsx @@ -52,11 +52,12 @@ export function DualCurrencyInput({ placeholder="0" keyboardType="number-pad" value={inputMode === "sats" ? amount : fiatAmount} - cursorColor={CURSOR_COLOR} + selectionColor={CURSOR_COLOR} onChangeText={onChangeText} aria-labelledbyledBy="amount" style={styles.amountInput} autoFocus={autoFocus} + returnKeyType="done" // aria-errormessage="inputError" /> diff --git a/components/ui/input.tsx b/components/ui/input.tsx index 2cb0f2d..0ed66bc 100644 --- a/components/ui/input.tsx +++ b/components/ui/input.tsx @@ -16,7 +16,7 @@ const Input = React.forwardRef< props.editable === false && 'opacity-50 web:cursor-not-allowed', className )} - cursorColor={CURSOR_COLOR} + selectionColor={CURSOR_COLOR} placeholderClassName={cn('text-muted-foreground', placeholderClassName)} {...props} /> diff --git a/pages/receive/Receive.tsx b/pages/receive/Receive.tsx index c8f4c7e..9454d14 100644 --- a/pages/receive/Receive.tsx +++ b/pages/receive/Receive.tsx @@ -290,6 +290,7 @@ export function Receive() { placeholder="No description" value={comment} onChangeText={setComment} + returnKeyType="done" /> diff --git a/pages/send/LNURLPay.tsx b/pages/send/LNURLPay.tsx index 1eb036e..21f1a92 100644 --- a/pages/send/LNURLPay.tsx +++ b/pages/send/LNURLPay.tsx @@ -66,6 +66,7 @@ export function LNURLPay() { placeholder="Enter an optional comment" value={comment} onChangeText={setComment} + returnKeyType="done" /> diff --git a/pages/send/Send.tsx b/pages/send/Send.tsx index c2a1f02..58a1c6e 100644 --- a/pages/send/Send.tsx +++ b/pages/send/Send.tsx @@ -172,6 +172,7 @@ export function Send() { onChangeText={setKeyboardText} inputMode="email" autoFocus + returnKeyType="done" // aria-errormessage="inputError" /> diff --git a/pages/settings/FiatCurrency.tsx b/pages/settings/FiatCurrency.tsx index 894cdd3..13c9289 100644 --- a/pages/settings/FiatCurrency.tsx +++ b/pages/settings/FiatCurrency.tsx @@ -29,6 +29,7 @@ export function FiatCurrency() { placeholder="USD" value={fiatCurrency} onChangeText={setFiatCurrency} + returnKeyType="done" // aria-errormessage="inputError" /> diff --git a/pages/settings/address-book/NewAddressBookEntry.tsx b/pages/settings/address-book/NewAddressBookEntry.tsx index 5eb2495..77518c0 100644 --- a/pages/settings/address-book/NewAddressBookEntry.tsx +++ b/pages/settings/address-book/NewAddressBookEntry.tsx @@ -34,6 +34,7 @@ export function NewAddressBookEntry() { value={name} onChangeText={setName} aria-labelledbyledBy="name" + returnKeyType="done" // aria-errormessage="inputError" />