setting post display scroll to have min height equals window

android web view do not support scrollEnabled property and when scroll viewport is less than scrollable height, the webview was letting the content to be scroll, this was happening for both comment and body.

now, since height will always be scrollable, content of webview is set to not scrollable.
This commit is contained in:
Nouman Tahir 2021-08-17 16:12:10 +05:00
parent 081e8db658
commit d8cc65375c
2 changed files with 5 additions and 0 deletions

View File

@ -1,3 +1,4 @@
import { Dimensions } from 'react-native';
import EStyleSheet from 'react-native-extended-stylesheet';
export default EStyleSheet.create({
@ -26,6 +27,9 @@ export default EStyleSheet.create({
backgroundColor: '$primaryBackgroundColor',
marginBottom: 40,
},
scrollContent: {
minHeight: Dimensions.get('window').height,
},
footer: {
flexDirection: 'column',
marginTop: 19,

View File

@ -204,6 +204,7 @@ const PostDisplayView = ({
<View style={styles.container}>
<ScrollView
style={styles.scroll}
contentContainerStyle={styles.scrollContent}
onScroll={(event) => _handleOnScroll(event)}
scrollEventThrottle={16}
refreshControl={<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />}