Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TextareaAutosize] Fix one possible case of infinite render loop #16387

Merged
merged 1 commit into from Jun 27, 2019
Merged

[TextareaAutosize] Fix one possible case of infinite render loop #16387

merged 1 commit into from Jun 27, 2019

Conversation

ZYinMD
Copy link
Contributor

@ZYinMD ZYinMD commented Jun 26, 2019

Closes #16222 When user sets a padding for <Input multiline />, Chrome in a scaled Win10 monitor may display a scrollbar which leads to infinite redering loop. It may has to do with how height is rounded up or down to whole pixels on a non-retina monitor when scaled.

I was not the one who wrote the fix, but I was encouraged to submit the PR.

Similar logic to compare innerHeight and outerHeight was already used in another location in the same file.

When user sets a padding for <Input multiline />, Chrome in a scaled Win10 monitor may display a scrollbar which leads to infinite redering loop. The fix is provided by  @oliviertassinari. Similar logic to compare innerHeight and outerHeight has been used before in another location in the same file.
@oliviertassinari oliviertassinari changed the title [Input] fix a bug where <Input multiline /> causes infinite render loop in some cases [TextareaAutosize] Fix one possible case of infinite render loop Jun 26, 2019
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work component: TextareaAutosize The React component. labels Jun 26, 2019
@ZYinMD
Copy link
Contributor Author

ZYinMD commented Jun 26, 2019

First PR, sorry I may have been confused about the # numbers in the end of each previous commit messages when doing git log --oneline, were they auto appended PR numbers? I thought they were the original commit messages with manually appended issue numbers, I may need to redo my commit message.

@mui-pr-bot
Copy link

Details of bundle changes.

Comparing: 8c83da6...d7a318c

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% 0.00% 320,016 320,027 88,351 88,354
@material-ui/core/Paper 0.00% 0.00% 68,290 68,290 20,366 20,366
@material-ui/core/Paper.esm 0.00% 0.00% 61,573 61,573 19,161 19,161
@material-ui/core/Popper 0.00% 0.00% 28,945 28,945 10,395 10,395
@material-ui/core/Textarea +0.20% 🔺 +0.17% 🔺 5,513 5,524 2,374 2,378
@material-ui/core/TrapFocus 0.00% 0.00% 3,753 3,753 1,578 1,578
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,009 16,009 5,791 5,791
@material-ui/core/useMediaQuery 0.00% 0.00% 2,597 2,597 1,102 1,102
@material-ui/lab 0.00% 0.00% 140,075 140,075 43,391 43,391
@material-ui/styles 0.00% 0.00% 51,698 51,698 15,348 15,348
@material-ui/system 0.00% 0.00% 15,420 15,420 4,391 4,391
Button 0.00% 0.00% 84,296 84,296 25,712 25,712
Modal 0.00% 0.00% 14,427 14,427 5,087 5,087
Portal 0.00% 0.00% 3,473 3,473 1,572 1,572
Slider 0.00% 0.00% 74,775 74,775 23,246 23,246
colorManipulator 0.00% 0.00% 3,904 3,904 1,544 1,544
docs.landing 0.00% 0.00% 54,843 54,843 13,901 13,901
docs.main 0.00% 0.00% 646,477 646,488 203,788 203,791
packages/material-ui/build/umd/material-ui.production.min.js 0.00% +0.01% 🔺 293,222 293,233 84,233 84,239

Generated by 🚫 dangerJS against d7a318c

@oliviertassinari
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: TextareaAutosize The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Textarea] May crash on scaled windows monitors because Chrome renders a scrollbar
4 participants