If there a big image inside the new Dialog a part of it will be rendered outside of the view port because he detecting height before the image load.
I solve this on my side by having this callback: window.dispatchEvent(new Event('resize'));
on onLoad of <img />
The weird thing is that the image is not even load remotely its a props passed down. Look like
<img src={'data:image/png;base64, ' + this.props.position.image} /> is async and causing the image getting rendered in a different loop
Ran into this issue, fixed by preloading the image first, before opening dialog and setting its contents:
const image = new Image();
image.onload = () => {
this.setState({
previewOpen: true,
dialogContent: <img style={imgStyle} src={imgPath}/>
});
};
image.src = imgPath;
Most helpful comment
Ran into this issue, fixed by preloading the image first, before opening dialog and setting its contents: