[Android] gifted chat scroll sometimes doesn't works
See original GitHub issueIssue Description
gifted chat’s scroll sometimes doesn’t works only in the Android platform. I found that if I use TouchableWithoutFeedback, scroll doesn’t work properly. It is weird that if I starts scrolling at message bubble or avatar profile(I think it is touchable component), scroll works well. How can I fix it?
I use TouchableWithoutFeedback and KeyboardAvoidingView for chat view adjust keyboard’s size.
Steps to Reproduce / Code Snippets
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
<KeyboardAvoidingView
behavior="padding"
onStartShouldSetResponder={() => true}
keyboardVerticalOffset={
Platform.OS === "ios" ? 0 : -Dimensions.get("window").height
}
style={{ flex: 1, backgroundColor: "#000" }}
>
<OtherComponents/>
<GiftedChat
ref="giftedChat"
style={{ flex: 9 }}
messages={this.state.messages}
onSend={(messages) => this.onSend(messages)}
renderBubble={this._renderBubble}
renderTime={this._renderTime}
renderMessage={this._renderMessage}
renderSend={this._renderSend}
renderInputToolbar={this._renderInputToolbar}
textInputStyle={styles.chatTextInput}
placeholder="Your messages..."
isKeyboardInternallyHandled={false}
scrollToBottom={true}
onPressAvatar={() =>
this._openPartnerProfileModal(
this.props.navigation.getParam("partnerProfildId")
)
}
user={{
_id: this.state.loginUserId,
name: "me",
avatar: "",
}}
/>
<OtherComponents/>
</KeyboardAvoidingView>
</TouchableWithoutFeedback>
Expected Results
I hope scroll works well in the android platform.
Additional Information
- Nodejs version: v12.16.1
- React version: 16.13.1
- React Native version: 0.63.3
- react-native-gifted-chat version: ^0.16.3
- Platform(s) (iOS, Android, or both?): [FILL THIS OUT]
- TypeScript version: [FILL THIS OUT]
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Giftedchat scroll not working if dragging slow on background
But it doesn't when dragging slowly starting over the background. Am I mising something in the giftedchat props? giftedchat slow drag bug.
Read more >react-native-gifted-chat - npm
The most complete chat UI for React Native. ... Start using react-native-gifted-chat in your project by running `npm i ...
Read more >[Update: Dec. 07] YouTube bugs/issues & pending ...
Here we are tracking all the bugs and problems found on YouTube and their status as well as any pending improvements that are...
Read more >Expo React Native Chat App | iOS and Android ... - YouTube
In this video , we will walk through how to use the firebase to store and fetch the messages. With the help of...
Read more >FAQ | Animal Crossing: New Horizons (ACNH) (ACNH)
This sometimes happens due to lag, and can especially affect mobile users. Try closing and restarting the app. TRADING. How do I protect...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
I’m having the same issue here but also on iOS. The screen only scrolls if I start scrolling at message bubble
removed flex:1 it will fix the scrolling issues.