From d8cc65375cf0cc7f6570894cc64e7aaabf540149 Mon Sep 17 00:00:00 2001 From: Nouman Tahir Date: Tue, 17 Aug 2021 16:12:10 +0500 Subject: [PATCH] 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. --- src/components/postView/view/postDisplayStyles.js | 4 ++++ src/components/postView/view/postDisplayView.js | 1 + 2 files changed, 5 insertions(+) diff --git a/src/components/postView/view/postDisplayStyles.js b/src/components/postView/view/postDisplayStyles.js index 93ccb687b..5e494f7fb 100644 --- a/src/components/postView/view/postDisplayStyles.js +++ b/src/components/postView/view/postDisplayStyles.js @@ -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, diff --git a/src/components/postView/view/postDisplayView.js b/src/components/postView/view/postDisplayView.js index f757c50a0..9d084a14d 100644 --- a/src/components/postView/view/postDisplayView.js +++ b/src/components/postView/view/postDisplayView.js @@ -204,6 +204,7 @@ const PostDisplayView = ({ _handleOnScroll(event)} scrollEventThrottle={16} refreshControl={}