Skip to content

Commit

Permalink
fix: disable autoFocus on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
honeymaro committed Sep 15, 2023
1 parent 37e1583 commit 7371d9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/forms/SwapTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -116,7 +117,7 @@ const SwapTokens = ({
name="search"
onChange={(e) => setSearchKeyword(e.target.value)}
autoComplete="off"
autoFocus
autoFocus={!isMobile()}
placeholder="Search name or address"
/>
</section>
Expand Down

0 comments on commit 7371d9f

Please sign in to comment.