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

When Android keyboard opens, it readjusts the height of the model #16

Open
abeikverdi opened this issue Oct 17, 2016 · 2 comments
Open

Comments

@abeikverdi
Copy link

Is there a way to remove modal readjustment when the keyboard is opened? I have a TextInput in the modal and when the keyboard is opened the whole model readjusts itself based on the current smaller view on top of the keyboard.

@httnn
Copy link
Owner

httnn commented Aug 18, 2017

@abeikverdi could you provide an example project where this is happening?

@jfajardo
Copy link

jfajardo commented Mar 20, 2018

i fix it setting offset in the modal when show the weyboard

componentWillMount(){
        Keyboard.addListener('keyboardDidShow', () =>{this.setState({offset:-100})});
        Keyboard.addListener('keyboardDidHide', () =>{this.setState({offset:0})});
    }

<Modal
      open={this.props.modal.show}
      closeOnTouchOutside={true}
      modalStyle={UtilStyles.modalStyle}
      offset={this.state.offset}
>

screen shot 2018-03-20 at 6 05 30 pm
screen shot 2018-03-20 at 6 07 28 pm

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

No branches or pull requests

3 participants