Skip to content

Add resignsFirstResponderOnScrollDown to MessageListConfig #769

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

Conversation

sovata8
Copy link
Contributor

@sovata8 sovata8 commented Mar 3, 2025

🔗 Issue Link

N/A

🎯 Goal

Add a config option to control whether scrolling down on the message list dismisses the keyboard (resigns first responder)

🛠 Implementation

In MessageListConfig we add a new property - resignsFirstResponderOnScrollDown: Bool with a default value of true (existing behaviour). This is backwards compatible, existing code uses the default value.

🧪 Testing

If the MessageListConfig has resignsFirstResponderOnScrollDown = false, scrolling on down on a chat should not hide the keyboard.

🎨 Changes

In the following example, the config resignsFirstResponderOnScrollDown has been changed from the default true to false - and we can see the keyboard is not dismissed when the chat is scrolled.

Screen Recording 2025-03-03 at 21 16 59

☑️ Checklist

  • I have signed the Stream CLA (required)
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Affected documentation updated (docusaurus, tutorial, CMS (task created)

@sovata8 sovata8 requested a review from a team as a code owner March 3, 2025 22:12
@sovata8
Copy link
Contributor Author

sovata8 commented Mar 3, 2025

Note: I assume the checklist step "Affected documentation updated (docusaurus, tutorial, CMS (task created)" is for the repo maintainers, as I can't find documentation in the repo itself. The page which needs updating is this one: https://getstream.io/chat/docs/sdk/ios/swiftui/chat-channel-components/message-list/#message-list-configuration

@laevandus
Copy link
Contributor

Hi @sovata8,
Thank you for your contribution. Sure, these other items in the checklist are for maintainers. We'll review the change soon.

@laevandus
Copy link
Contributor

Hi @sovata8, we have reviewed this and decided to take it in. I ran CI checks separately of this PR and everything is good. I will merge the change. Thank you

@laevandus laevandus merged commit 5a6bc4c into GetStream:develop Mar 5, 2025
@Stream-SDK-Bot Stream-SDK-Bot mentioned this pull request Mar 14, 2025
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

Successfully merging this pull request may close these issues.

2 participants