[Grid] .MuiGrid-grid-md class does not load when the page is loaded at xs width
See original GitHub issue- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior š¤
Grid should be responsive even when the page is loaded as xs
width.
Current Behavior šÆ
Grid is not responsive.
Steps to Reproduce š¹
The bug is reproducible here: http://ec2-18-217-230-111.us-east-2.compute.amazonaws.com/diagnoses/Ondineās curse (It is a live (changing, in development) site, but Iāll try to keep it in the state so the bug is reproducible for some time.)
- Shrink the page to xs size (<600px width).
- Click on the āDark Diagnosisā in the header. (This will go to another route, thus unmounting the components from the current route.)
- Widen the page above xs size (>600px width).
- Click on some image (for example the one that was open initially), thus going to the single image route. (If you clicked on the image that was open in the beginning you will go to the initial route).
The image and description will stay at 100% width. The image and description should shrink to 50% width each, and they should fit in the same row. Gridās sm
class was not applied to the component.
The following code describes the mentioned components on the above given website:
<Grid container>
<Grid item xs={12} sm={6}>
<img src={diagnosisData.imageUrl} width='100%' height='100%' style={{borderRadius: '5%'}}/>
</Grid>
<Grid item xs={12} sm={6}>
{descriptionComponent}
</Grid>
</Grid>
Context š¦
The bug does not occur always. After it occurs, changing the width by 1px the .MuiGrid-grid-sm
class gets applied to the elements correctly and the elements shrink.
Your Environment š
Tech | Version |
---|---|
Material-UI | v4.2.0 |
React | 16.8.6 |
Browser | Chrome 75.0 |
TypeScript | No |
(Couldnāt reproduce in FF)
Issue Analytics
- State:
- Created 4 years ago
- Comments:22 (22 by maintainers)
Top GitHub Comments
Iāve tested a bit. The issue happens until v81, and does not happen at v83. So it is confirmed that itās been fixed in Chrome somewhere in that period.
@mbrookes It would be at least good that someone else confirms that this doesnāt appear any more on latest Chrome, as the issue is not of consistent nature.