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

Input gets cleared on keyboard dismiss #2523

Open
steavenb opened this issue Aug 29, 2024 · 1 comment
Open

Input gets cleared on keyboard dismiss #2523

steavenb opened this issue Aug 29, 2024 · 1 comment

Comments

@steavenb
Copy link

Input gets cleared on keyboard dismiss

While typing a message, if we click on the messages section and dismiss the keyboard, the input message is cleared

Expected Results

It should not clear, or there should be a prop that controls it.

@ImBeCiliC
Copy link

ImBeCiliC commented Sep 6, 2024

This is due to a PR that added a reset of the text. This also happens when you switch to emoji keyboard.

This is the part that adds the issue:
https://github.com/FaridSafi/react-native-gifted-chat/pull/2493/files#diff-b11e3f8b30e19689a33f545b3567228eb41fd9cfbbad474b1b21e7b63eaa2d57R542-R545

@steavenb we fixed it with a custom composer and adding the prop text as null
renderComposer={(composerProps: ComposerProps) => <ChatComposer {...composerProps} text={null} />}

Edit:
Above fix introduced multiple issues caused by setting text to null manually therefore we created a patch for this issue and open a PR for this fix.
#2541

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