[iOS]KeyboardAvoidingView When I turn on the reduced Motion, the page is blank #36100
Labels
API: Keyboard
Component: KeyboardAvoidingView
Needs: Triage 🔍
Platform: iOS
iOS applications.
Stale
There has been a lack of activity on this issue and it may be closed soon.
Description
I used KeyboardAvoidingView in my project and set the behavior to padding in iOS. I found that when I turned on reduced motion, the page turned white when the keyboard was retracted, KeyboardAvoidingView will top the page very high.I found that the project on the reactNative official website also has this problem.
20230209-102617.mp4
Version
0.65.1 and 0.71
Output of
npx react-native info
System:
OS: macOS 12.6
CPU: (8) x64 Apple M1 Pro
Memory: 127.09 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 14.15.0 - ~/.nvm/versions/node/v14.15.0/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v14.15.0/bin/npm
Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.3 AI-213.7172.25.2113.9123335
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 11.0.16 - /usr/bin/javac
npmPackages:
@react-native-community/cli: 5.0.1 => 5.0.1
react: 17.0.2 => 17.0.2
react-native: 0.65.1 => 0.65.1
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Open the reduced motion to open the page containing the KeyboardAvoidingView, and pop up and put away the keyboard.
Snack, code example, screenshot, or link to a repository
import React from 'react';
import {
View,
KeyboardAvoidingView,
TextInput,
StyleSheet,
Text,
Platform,
TouchableWithoutFeedback,
Button,
Keyboard,
} from 'react-native';
const KeyboardAvoidingComponent = () => {
return (
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={styles.container}>
Header
<Button title="Submit" onPress={() => null} />
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
inner: {
padding: 24,
flex: 1,
justifyContent: 'space-around',
},
header: {
fontSize: 36,
marginBottom: 48,
},
textInput: {
height: 40,
borderColor: '#000000',
borderBottomWidth: 1,
marginBottom: 36,
},
btnContainer: {
backgroundColor: 'white',
marginTop: 12,
},
});
export default KeyboardAvoidingComponent;
20230209-102617.mp4
The text was updated successfully, but these errors were encountered: