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 crash when used with React 18 & Suspense #33238

Merged
merged 4 commits into from Jun 24, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/mui-base/src/TextareaAutosize/TextareaAutosize.js
Expand Up @@ -39,6 +39,11 @@ const TextareaAutosize = React.forwardRef(function TextareaAutosize(props, ref)

const syncHeight = React.useCallback(() => {
const input = inputRef.current;

if (!input) {
return;
}

const containerWindow = ownerWindow(input);
const computedStyle = containerWindow.getComputedStyle(input);

Expand Down