Open mateus-cazuza opened 3 years ago
I'm having the same problem, but with react-native-modalize v2.0.8 Is there any news?
The solution that worked for me:
add avoiKeyboardLikeIOS={true}
change keyboardAvoidingBehavior="height"
(default is 'padding', that makes whitespace on bottom).
Update: Better set keyboardAvoidingBehavior={Platform.OS == 'android' ? 'height' : 'padding'}
, because if you have multiple inputs on IOS 'height'
causes some bugs, with 'padding'
everything works fine on IOS
Also, there is jumping on Android devices on input focus my solution was to set modalStyle
to:
{ flex: 1, marginTop: top + 35 }
.
top
variable comes from useSafeAreaInsets()
from react-native-safe-area-context
The keyboard is in another modal, I don’t know why is closing the one with react-native-modalize
try 'adjustToContentHeight' to modalize. It worked for me.
I believe I'm experiencing this weird issue, not sure why focusing on the input closes the modal down.
Having the same issue here. Selecting the TextInput closes the Modal , even though the TextInput is within the Modal.
Describe the bug I'm using the repository's own demo [expo].
Always Open Mode
In this type of modal we have two positions: 'Initial' and 'Top'. When I make the Swipe Up gesture the modal is full screen 'Top'. When this is full screen I render a TextInput that when receiving focus the keyboard appears and the modal closes returning to the 'Inital' position.
How can I get an Input in this type of modal without it closing?
Reproduce Use the Demo provided by that repository.
Edit the AlwaysOpen File, insert the TextInput component into it
Dependencies: