Fix ScratchImage visibility check on Windows Firefox ESR

This commit is contained in:
Christopher Willis-Ford committed 2019-03-13 11:09:36 -07:00
1 parent 790fc13157
commit ce5aa9fb7a
1 file changed
+3 -2
@@ -106,8 +106,9 @@ class ScratchImage extends React.PureComponent {
return (
<img
src={this.state.imageURI}
// the element must have non-zero size for VisibilitySensor to work before image load
style={{minWidth: '1px', minHeight: '1px'}}
// The element must have non-zero size for VisibilitySensor to work before image load.
// Some versions of Firefox don't honor CSS minimum size without changing `display`.
style={{display: 'inline-block', minWidth: '1px', minHeight: '1px'}}
{...imgProps}
/>
);