answer bet panel: scroll up on ios
This commit is contained in:
parent
5c166b9dd5
commit
68343701ca
|
@ -25,6 +25,7 @@ import {
|
||||||
import { Bet } from 'common/bet'
|
import { Bet } from 'common/bet'
|
||||||
import { track } from 'web/lib/service/analytics'
|
import { track } from 'web/lib/service/analytics'
|
||||||
import { SignUpPrompt } from '../sign-up-prompt'
|
import { SignUpPrompt } from '../sign-up-prompt'
|
||||||
|
import { isIOS } from 'web/lib/util/device'
|
||||||
|
|
||||||
export function AnswerBetPanel(props: {
|
export function AnswerBetPanel(props: {
|
||||||
answer: Answer
|
answer: Answer
|
||||||
|
@ -44,6 +45,7 @@ export function AnswerBetPanel(props: {
|
||||||
|
|
||||||
const inputRef = useRef<HTMLElement>(null)
|
const inputRef = useRef<HTMLElement>(null)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (isIOS()) window.scrollTo(0, window.scrollY + 200)
|
||||||
inputRef.current && inputRef.current.focus()
|
inputRef.current && inputRef.current.focus()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user