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

Message not scroll smoothly when Keyboard open and close #2191

Open
zeeshan-shabbir opened this issue Apr 21, 2022 · 18 comments · May be fixed by #2493
Open

Message not scroll smoothly when Keyboard open and close #2191

zeeshan-shabbir opened this issue Apr 21, 2022 · 18 comments · May be fixed by #2493

Comments

@zeeshan-shabbir
Copy link

Issue Description

when keyboard open messages did not goes smoothly with keyboard rather take time .

Expected Results

Should move smoothly when keyboard open or close

Additional Information

  • React version: [17.0.2]
  • React Native version: [0.67.3]
  • react-native-gifted-chat version: [(https://github.com/FaridSafi/react-native-gifted-chat)]
  • Platform(s) (iOS, Android, or both?): [Android]
    ezgif com-gif-maker
@ghoudi01
Copy link

Same here

@fukemy
Copy link

fukemy commented Apr 25, 2022

just build in release mode

@fukemy
Copy link

fukemy commented May 4, 2022

i tested in release mode, still problem with android, ios work good

@arshnk-deloitte
Copy link

same here

@zeeshan-shabbir
Copy link
Author

I tested with m1 mac simulator,build in release mode, and the layout took about ~500-800 milliseconds to resize after keyboard showed

What should we do?

@fukemy
Copy link

fukemy commented Jul 25, 2022

i see the log of metro and I see the screen re-render 4 times when keyboard show, i think better we need to use wix keyboard input

@fukemy
Copy link

fukemy commented Jul 25, 2022

test the demo with android simulator( not m1), it's took delay when press to show keyboard first time, but very smooth animation

@VladislavTemriuk
Copy link

Any solutions?

@hotaryuzaki
Copy link

any solution gaesss??
i search everywhere for days but i dont find any solution

@VladislavTemriuk
Copy link

@hotaryuzaki unfortunately, I also did not find solutions to this problem, so I had to abandon the use of this library, but it did not turn out to be a big problem, since all the components were already custom (text, images, time, send/read tick marks, etc.). So I just use FlatList and it works fine

@hotaryuzaki
Copy link

@hotaryuzaki unfortunately, I also did not find solutions to this problem, so I had to abandon the use of this library, but it did not turn out to be a big problem, since all the components were already custom (text, images, time, send/read tick marks, etc.). So I just use FlatList and it works fine

Yes maybe it is better to create the UI by ourselves.

I tried tricky fix with keyboard event but sadly android didn't have keyboardWillShow and keyboardWillHide.
I think we can use keyboardWillHide to change windowSoftInputMode to adjustPan.
But for temporary solution I create animation using scheduleLayoutAnimation in keyboardDidHide, it feels more convenient.

For more investigation, what I found this problem just occurred in Android 10 and below.
Maybe it's android limitation
I create temporary solution only for that versions.

And maybe next week I will create touch/scroll event outside the keyboard, for this I think I can set windowSoftInputMode to adjustPan then hide the keyboard by using keyboard.dismiss().
(I made backhandler event to do this trick but the event didn't called when keyboard is open)

@danyzor
Copy link

danyzor commented Jan 13, 2023

Any solutions? :(

@fukemy
Copy link

fukemy commented May 8, 2023

the solution is useAnimatedKeyboard

@BuqiLiao
Copy link

@fukemy Could you be more specific?

@hummingbird1602
Copy link

hummingbird1602 commented Oct 9, 2023

i just used reanimated for smooth animation. but flatlist reload everytime when scroll and it make performance problem

@fukemy
Copy link

fukemy commented Oct 10, 2023

@sirusbaladi
Copy link

big issue for me too.

@kesha-antonov kesha-antonov linked a pull request Apr 5, 2024 that will close this issue
@kesha-antonov
Copy link
Contributor

kesha-antonov commented Apr 5, 2024

Hi

Please try my PR

#2493

"react-native-gifted-chat": "kesha-antonov/react-native-gifted-chat#43625da0ae36d983c339c0d79ae900c8778f5241"

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 a pull request may close this issue.