You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If keyboard already opened in current screen, when navigate to next screen and focus TextInput, const { height } = useAnimatedKeyboard() is 0, It should be Keyboard.metrics().height, the state is also wrong , should be KeyboardState.OPEN
Steps to reproduce
import{useEffect,useRef}from'react'import{SafeAreaView,TextInput}from'react-native'importAnimated,{useAnimatedKeyboard,useAnimatedStyle}from'react-native-reanimated'// open keyboard in this screenexportfunctionMainScreen(){return(<SafeAreaView><TextInput/></SafeAreaView>)}exportfunctionNextScreen(){const{ height }=useAnimatedKeyboard()constref=useRef<TextInput>(null)constisInit=useRef(false)constanimatedStyle=useAnimatedStyle(()=>{return{transform: [{translateY: -height.value}],}})useEffect(()=>{if(isInit.current===false&&ref.current!==null){ref.current.focus()}},[ref])return(<SafeAreaView><Animated.Viewstyle={[{alignSelf: 'flex-end'},animatedStyle]}><TextInputref={ref}/></Animated.View></SafeAreaView>)}
Snack or a link to a repository
sorry, snack.expo.io not work for me
Reanimated version
3.16.7
React Native version
0.77.1
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered:
Description
If keyboard already opened in current screen, when navigate to next screen and focus
TextInput
,const { height } = useAnimatedKeyboard()
is0
, It should beKeyboard.metrics().height
, the state is also wrong , should beKeyboardState.OPEN
Steps to reproduce
Snack or a link to a repository
sorry, snack.expo.io not work for me
Reanimated version
3.16.7
React Native version
0.77.1
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: