On iPhone, for every keystroke input toolbar jumps up and down.
I investigated little bit and found that onKeyboardWillShow is called for every keystroke, and it keeps changing bottomOffset by this.setBottomOffset(this.safeAreaSupport(this.props.bottomOffset))
It seems code safeAreaSupport has changed in master (maybe fixes the issue??), but not reflected in the latest version.
Type anything on iPhone.
No jumping
Same issue
Well, I think that is ios 14 problem and I found the solution here
https://github.com/FaridSafi/react-native-gifted-chat/issues/1930
@hungvu193 Thanks! I tried your solution with KeyboardAvoidingView, but it didn't work for me.
I solved it by that way
bottomOffset={(Platform.OS === 'ios' && 33) || null}
I solved it by that way
bottomOffset={(Platform.OS === 'ios' && 33) || null}
The above solution has issues on larger devices ie iPad pro (4th gen).
Changing it to:
bottomOffset={undefined}
appears to have a better, usable result, yet not perfect.
A real fix would be appreciated! Thanks
@VDubber where should we add this ? bottomOffset={undefined}
@VDubber where should we add this ? bottomOffset={undefined}
bottomOffset is a prop of GiftedChat so...
<GiftedChat bottomOffset={undefined} />
I tried that but doesn't work for me. Thanks
@VDubber
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Try this:
const insets = useSafeAreaInsets();
// GiftedChat props
bottomOffset={insets.bottom}
with useSafeAreaInsets from react-native-safe-area-context
Most helpful comment
I solved it by that way