Open ysng007 opened 1 year ago
GiftedChat.js
if (maxHeightRef.current !== layout.height ||
isFirstLayoutRef.current === true) {
+ if (Platform.OS === 'android') {
maxHeightRef.current = layout.height;
setState({
...state,
messagesContainerHeight: keyboardHeightRef.current > 0
? getMessagesContainerHeightWithKeyboard()
: getBasicMessagesContainerHeight(),
});
+ }
}
So the problem solved?
After searching for the reason for a few days, I found that the real reason is that there is code in the native iOS that handles the keyboard globally, and compatibility is sufficient in the native iOS code. There are no issues with this library itself.
thanks. Could you tell me how to deal with this problem.I haven't found a way to solve this problem yet
I'm not sure if your problem is the same as mine. I built a clean RN project and used GiftChat, which performed normally on iOS to eliminate RN issues. Then, I asked iOS native developers to check the problem and create a clean iOS project, which is also normal. So, let's continue to see if there are any configurations in the app. It took some time and he also found the problem. I'm only good at JS, this should not be difficult for iOS native developers. If you are not good at native development, you can seek help from other native developers.
I'm just as good at JS, I don't know about IOS. I ran into this problem because I was using the web side in an RN environment,This problem is fine in the context of RN
make a snack repo I can help u fix this
Issue Description
Not available on ios when using alignTop
Steps to Reproduce / Code Snippets
https://github.com/FaridSafi/react-native-gifted-chat/assets/48479676/8dead0d2-837e-4a71-9868-ae475e1411f7
https://github.com/FaridSafi/react-native-gifted-chat/assets/48479676/279dc813-8711-443b-8b9a-32491e03a53b
https://github.com/FaridSafi/react-native-gifted-chat/assets/48479676/4d3c0813-240d-46e7-a674-c7d50ee248dc
Expected Results
Additional Information