-
-
Notifications
You must be signed in to change notification settings - Fork 663
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
WIP: messages: Do not close keyboard when tapping messages #2157
Conversation
This should work but doesn't. Relevant: facebook/react-native#16826
I don't totally follow -- do you mean the existing code should work, but doesn't because of that RN bug? Why a ScrollView? I'd worry a bit about nesting a ScrollView with the scrolling in the MessageListContainer. Does this code definitely prevent the ScrollView from doing any scrolling? If so, could we move this workaround into our Another thing I notice as I look at the existing code around this: our KeyboardAvoider is actually just a nop |
Yeah, the code is correct, but doesn't work with WebView because of RN. |
The KeyboardAvoider is trying to abstract away the difference in the behavior between the two platforms. After we added it, few bug fixes were done in RN related to the |
Thanks, that's helpful. I'd still like to know in particular, though: does this code definitely prevent the ScrollView from doing any scrolling? That's the possibility that would make me concerned about us merging a workaround like this. Also: why don't we want to close the keyboard when tapping messages? |
Yes, the ScrollView definitely does not break anything, but also does not work, so no point in merging. |
I see. OK, that is what I tried to clarify above -- when you say "This should work" and "the code is correct, but doesn't work", I do not know if you mean
That's why I asked my first question above; and I really thought your answer was confirming that you believe the current code in master is "correct, but doesn't work". Now I think you were referring to the code in the PR. So let's try to be super explicit about this; it's not fun to talk past each other.
I think here you mean the behavior that this PR was intended to get, where tapping on messages doesn't close the keyboard. Can you confirm whether that's what you mean? |
Doing a super quick survey of some other chat apps, on Android:
So that's 2/4 where the keyboard goes away, and 1/3 out of those that don't navigate to another screen. That seems like enough diversity that just consistency isn't a strong reason to prefer something. |
I tested all you listed, plus Slack and Discord which also did not hide the keyboard. |
I listed Slack:
What did you observe specifically -- was it different from that? Count me as a user report that keeping the keyboard in view would be not behaving as I expect. :-) |
I meant 'Skype'. |
This should work but doesn't. Relevant:
facebook/react-native#16826