Open sathyapriya31 opened 2 months ago
same did you fixed this?
Same here on android
fast solution: catch onFocus
screen event, before navigate/show modal -> hide keyboard first
keyboard is not getting visiiable
https://github.com/user-attachments/assets/12baa07f-e050-486a-880e-0a6b3fb45181
fast solution: catch
onFocus
screen event, before navigate/show modal -> hide keyboard first
can you please post some sample code i have been trying with this with no luck
const navigation = useNavigation();
useEffect(() => {
const unsubscribe = navigation.addListener('beforeRemove', () => {
// Hide the keyboard just before leaving the screen
Keyboard.dismiss();
console.log('Keyboard dismissed');
});
return unsubscribe;
}, [navigation]);
fast solution: catch
onFocus
screen event, before navigate/show modal -> hide keyboard firstcan you please post some sample code i have been trying with this with no luck
const navigation = useNavigation(); useEffect(() => { const unsubscribe = navigation.addListener('beforeRemove', () => { // Hide the keyboard just before leaving the screen Keyboard.dismiss(); console.log('Keyboard dismissed'); }); return unsubscribe; }, [navigation]);
dont do like that, before you navigate to new screen or show modal, lets check keyboard state first, hide it if showing, and navigate/show modal after delay ~250-300
+1 we are facing this issue as well
this helped me (iOS)
if (Keyboard.isVisible()) {
const onKeyboardDidHide = () => {
Keyboard.removeAllListeners('keyboardDidHide');
navigation.navigate('');
};
Keyboard.addListener('keyboardDidHide', onKeyboardDidHide);
Keyboard.dismiss();
} else {
navigation.navigate('');
}
any solution?
Same problem! Hiding the keyboard when exiting the screen doesn't help.
no solution until now UI does not move down when keyboard hiding (only happens if I press onSend). Since tapping out to dismiss keyboard, it works fine
i have 2 apps One with Giftedchat nested inside bottom tabbar, problem occurs One without bottom tabbar, works fine. But I'm not sure that's the reason
i Think problem from useAnimatedKeyboard, this value stop tracking keyboard height after press onSend
Use rn keyboard controller instead
In react-native-gifted-chat v2.4.1 no problem.
the keyboard remains visible or its height is retained when navigating away from the screen and then returning to it
[FILL THIS OUT]
Steps to Reproduce / Code Snippets
[FILL THIS OUT]
Expected Results
[FILL THIS OUT]
Additional Information