react-native-simple-modal icon indicating copy to clipboard operation
react-native-simple-modal copied to clipboard

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

Open abeikverdi opened this issue 9 years ago • 2 comments

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.

abeikverdi avatar Oct 17 '16 04:10 abeikverdi

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

httnn avatar Aug 18 '17 11:08 httnn

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

jfajardo avatar Mar 20 '18 23:03 jfajardo