From 68343701caac30092897123fad5f07caa3b61853 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Tue, 12 Jul 2022 17:47:48 -0500 Subject: [PATCH] answer bet panel: scroll up on ios --- web/components/answers/answer-bet-panel.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx index 6499ce36..8c1d0430 100644 --- a/web/components/answers/answer-bet-panel.tsx +++ b/web/components/answers/answer-bet-panel.tsx @@ -25,6 +25,7 @@ import { import { Bet } from 'common/bet' import { track } from 'web/lib/service/analytics' import { SignUpPrompt } from '../sign-up-prompt' +import { isIOS } from 'web/lib/util/device' export function AnswerBetPanel(props: { answer: Answer @@ -44,6 +45,7 @@ export function AnswerBetPanel(props: { const inputRef = useRef(null) useEffect(() => { + if (isIOS()) window.scrollTo(0, window.scrollY + 200) inputRef.current && inputRef.current.focus() }, [])