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

Uncaught TypeError: Cannot set property 'scrollTop' of null #31

Closed
masbaehr opened this issue Oct 16, 2019 · 3 comments
Closed

Uncaught TypeError: Cannot set property 'scrollTop' of null #31

masbaehr opened this issue Oct 16, 2019 · 3 comments

Comments

@masbaehr
Copy link

Hi i'm encountering this issue recently:

"react": "^16.10.2",
"@material-ui/core": "^4.5.1",

Probably related to this line of code. Maybe something within React changed:

image

index.js:2534 Uncaught TypeError: Cannot set property 'scrollTop' of null
at e.scrollTo (index.js:2534)
at e. (index.js:2592)
at callCallback (react-dom.development.js:13936)
at commitUpdateEffects (react-dom.development.js:13976)
at commitUpdateQueue (react-dom.development.js:13964)
at commitLifeCycles (react-dom.development.js:21965)
at commitLayoutEffects (react-dom.development.js:25266)
at HTMLUnknownElement.callCallback (react-dom.development.js:363)
at Object.invokeGuardedCallbackDev (react-dom.development.js:412)
at invokeGuardedCallback (react-dom.development.js:465)
at commitRootImpl (react-dom.development.js:25002)
at unstable_runWithPriority (scheduler.development.js:818)

@masbaehr
Copy link
Author

It seems due to a change in MUI paper doesn't have the role="document" anymore.
I fixed it in my app by changing the querySelector to (".MuiPaper-root")

@alexplumb
Copy link
Owner

Thanks for putting in the legwork, @masbaehr. I'll see if I can find a more elegant way to fix it and publish a new release as soon as I can.

@alexplumb
Copy link
Owner

@masbaehr This should be fixed now

david-vendel referenced this issue in david-vendel/material-ui-phone-number-2 May 18, 2022
…es/react-18.0.6

Bump @types/react from 18.0.5 to 18.0.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants