Description
I use react modal in my app and it usually works fine. The app is a widget that is placed on various different sites. Now I face an issue where the -Component is not rendered anymore. While toggling it still works as intended no matter what content I put into the it does not appear. When checking variables I can see that the toggle actually works and there are some installations where the whole widget works as intended. I hope you can help me asking the right questions/looking in the right places to figure out the reason.
Here is my modal implementation:
<Modal
className="questionnaire-component"
isOpen={this.state.modalIsOpen}
onRequestClose={() => this.setState({modalIsOpen: false})}
style={ModalStyles}
contentLabel="Questionnaire"
onClick={this.closeModal}
>
{this.state.loading ?
<div style={{display: 'flex',justifyContent: 'center',margin: '50px'}}>
<Loading type='balls' color='#3C3C3B'/>
</div>
:
<div>Render component</div>
}
</Modal>
The styles:
const ModalStyles = {
overlay: {
position: 'fixed',
top: 0,
left: 0,
right: 0,
bottom: 0,
backgroundColor: 'rgba(255, 255, 255, 0.90)'
},
content: {
position: 'absolute',
top: 0,
left: 0,
right: 0,
height: '100%',
background: 'transparent',
overflow: 'auto',
WebkitOverflowScrolling: 'touch',
outline: 'none'
}
};
This might be unrelated but I also realised that tabbing through forms and close per click on backdrop do not work. I do not have any error statements (console or other). The app is build with webpack.