We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
问题场景:A页面有输入框,跳转到B页面,B页面跳转到C页面,C页面返回到B页面,点击B页面按钮(B页面没有输入框)会弹出键盘。
根因:B跳转到C,A页面display:none,C跳转到B,A页面display:flex。在这个过程中A页面元素有个销毁到重新渲染的过程。这块逻辑在react-native-screens中实现的,此库尚未鸿蒙化。
当前规避方案:修改navigation/stack库,在node_modules/@react-navigation/stack/src/views/Screens.tsx 中用到了react-native-screens库,此库尚未鸿蒙化。找到Screens.tsx中找到MaybeScreen替换以下代码即可: 修改处如下:
export const MaybeScreen = ({ enabled, active, ...rest }: ViewProps & { enabled: boolean; active: 0 | 1 | Animated.AnimatedInterpolation<0 | 1>; children: React.ReactNode; freezeOnBlur?: boolean; }) => { if (Screens != null && Platform.OS !==='harmony') { return ( <Screens.Screen enabled={enabled} activityState={active} {...rest} /> ); } return <View {...rest} />; };
No response
6.4.0-0.0.4
0.72.29
Debug app & dev bundle
Real device
Mate 60 pro(NEXT.0.0.66)
Yes
The text was updated successfully, but these errors were encountered:
No branches or pull requests
描述 / Description
问题场景:A页面有输入框,跳转到B页面,B页面跳转到C页面,C页面返回到B页面,点击B页面按钮(B页面没有输入框)会弹出键盘。
根因:B跳转到C,A页面display:none,C跳转到B,A页面display:flex。在这个过程中A页面元素有个销毁到重新渲染的过程。这块逻辑在react-native-screens中实现的,此库尚未鸿蒙化。
当前规避方案:修改navigation/stack库,在node_modules/@react-navigation/stack/src/views/Screens.tsx 中用到了react-native-screens库,此库尚未鸿蒙化。找到Screens.tsx中找到MaybeScreen替换以下代码即可:
修改处如下:
复现步骤 / Steps to reproduce
No response
库版本 / Library version
6.4.0-0.0.4
React Native OpenHarmony version
0.72.29
构建类型 / Build type
Debug app & dev bundle
设备 / Device
Real device
设备版本 / Device model
Mate 60 pro(NEXT.0.0.66)
已悉知 / Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: