From 7371d9f26230804230d9d3a535d1b46ec07c3c0c Mon Sep 17 00:00:00 2001 From: maro Date: Tue, 11 Jul 2023 01:39:51 +0900 Subject: [PATCH] fix: disable autoFocus on mobile --- src/forms/SwapTokens.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/forms/SwapTokens.tsx b/src/forms/SwapTokens.tsx index 773becb8..30b0734a 100644 --- a/src/forms/SwapTokens.tsx +++ b/src/forms/SwapTokens.tsx @@ -11,6 +11,7 @@ import Loading from "components/Loading" import { SwapTokenAsset } from "./useSwapSelectToken" import { VariableSizeList, ListChildComponentProps } from "react-window" import { useContractsAddress } from "hooks/useContractsAddress" +import { isMobile } from "@terra-money/wallet-controller/utils/browser-check" const cx = classNames.bind(styles) @@ -116,7 +117,7 @@ const SwapTokens = ({ name="search" onChange={(e) => setSearchKeyword(e.target.value)} autoComplete="off" - autoFocus + autoFocus={!isMobile()} placeholder="Search name or address" />