Closed bright-sea closed 7 years ago
https://medium.com/man-moon/writing-modern-react-native-ui-e317ff956f02 I am using this approach and it works well :)
handleModalClick() {
if (this.props.isKeyboardOpened) {
return this.refs.form.blur();
}
this.props.onClose(false);
}
and pass it to onPressBackdrop
. Clicking on the background will hide keyboard first instead of the whole modal.
For example, we have some input field in Modal, when we focus on this field, a keyboard will popup and overlay the Modal. We can't see input field and this is bad.
Is it possible for Modal automatically scroll up to show the input field currently focused?