[transitions] "Cannot read property `scrollTop` of null"
Open
@siriwatknp is already working on this.
Since Jul 8, 2021.
docs
scope: transitions
v5.x migration
waiting for 👍
- Dominant language
- JavaScript
- Stars
- 99.1k
- Forks
- 32.5k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 106
Description
- The issue is present in the latest release.
- I have searched the issues of this repository and believe that this is not a duplicate.
Current Behavior 😯
If the child of components does not forwardRef to DOM, it cause this error.
Expected Behavior 🤔
The error should be more informative about how to fix it.
Steps to Reproduce 🕹
Steps:
- open this sandbox https://codesandbox.io/s/transition-v5-error-dide8?file=/src/App.tsx
- change material-ui/core to v5.beta
- will see the error
Context 🔦
Is it better to display warning (in console) instead of Error?
Here is what I think about the dev experience.
- write the code (use Transition the wrong way, no forwardRef for child)
- check in browser, it does not work (the ui display without transitioning)
then, 3 possibilities
- they see the warning in console about why it does not work and link to full doc example
- they go to Transition docs
- worse case, they open the issue
Actions
- #27318
Your Environment 🌎
`npx @material-ui/envinfo`
Don't forget to mention which browser you used.
Output from `npx @material-ui/envinfo` goes here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.