Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The scroll view for messages cuts off exactly where the content ends. #2485

Open
bhavya-saurabh opened this issue Mar 8, 2024 · 1 comment

Comments

@bhavya-saurabh
Copy link

bhavya-saurabh commented Mar 8, 2024

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-gifted-chat/lib/MessageContainer.js b/node_modules/react-native-gifted-chat/lib/MessageContainer.js
index 6bdf6da..17f82e8 100644
--- a/node_modules/react-native-gifted-chat/lib/MessageContainer.js
+++ b/node_modules/react-native-gifted-chat/lib/MessageContainer.js
@@ -12,6 +12,7 @@ const styles = StyleSheet.create({
         flex: 1,
     },
     containerAlignTop: {
+        flex: 1,
         flexDirection: 'row',
         alignItems: 'flex-start',
     },

This issue body was partially generated by patch-package.

Description:

The scroll view for messages cuts off exactly where the content ends.

Expected Behavior:
When scrolling, screen should cut off right above the text input.

Current Behavior:
When scrolling, screen cuts off where the content ends.

bug:

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-08.at.20.05.06.mp4

solution:

Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-08.at.20.05.22.mp4
@andrewoodleyjr
Copy link

@bhavya-saurabh It looks like the specific code you mentioned isn't the solution. flex: 1 didn't work for me. Maybe it something else in the patch that's making it work based on my tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants