react-native-keyboard-aware-scroll-view
react-native-keyboard-aware-scroll-view copied to clipboard
Not working on android when inside modal when statusBarTranslucent applied to modal
import {Modal} from "react-native"
"react-native": "0.67.0", "react-native-keyboard-aware-scroll-view": "^0.9.5",
I have the same issue. Can maybe provide a bit more information if it maybe will be easier to solve this issue.
Expected Behavior
Content inside <KeyboardAwareScrollView />
should scroll, and stay visible even if inside <Modal />
and it has statusBarTranslucent
set to true
Current Behavior
When statusBarTranslucent
is set to true
on a <Modal />
component from react-native <KeyboardAwareScrollView />
inside this modal is not scrolling contents into view when keyboard is opened.
Steps to Reproduce
- create new react-native app
npx react-native init repro
- install react-native-keyboard-aware-scroll-view
yarn add [email protected]
- change code in App.js:
import React from 'react';
import { Modal, SafeAreaView, StyleSheet, Text, TextInput, View, } from 'react-native';
import {KeyboardAwareScrollView} from 'react-native-keyboard-aware-scroll-view';
const App = () => {
return (
<SafeAreaView style={styles.backgroundColor}>
<Text> Repro </Text>
<Modal style={styles.modal} statusBarTranslucent={true} transparent={true}>
<View style={styles.content}>
<KeyboardAwareScrollView
keyboardShouldPersistTaps="handled"
enableAutomaticScroll={false}>
<Text>Modal</Text>
<TextInput
testID="input_comment"
value={''}
placeholder={'text'}
multiline
style={styles.text_input}
/>
</KeyboardAwareScrollView>
</View>
</Modal>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
backgroundColor: {
backgroundColor: '#F3F3F3',
height: '100%',
},
modal: {
justifyContent: 'flex-end',
margin: 0,
},
content: {
height: '40%',
marginTop: 'auto',
backgroundColor: '#AAA',
padding: 16,
},
text_input: {
borderStyle: 'solid',
borderWidth: 1,
borderColor: '000',
},
});
export default App;
- run on Android
- Click inside text input
Context (Environment)
"react": "17.0.2",
"react-native": "0.68.0",
"react-native-keyboard-aware-scroll-view": "0.9.5"
Up
Same problem, any update?