[Dialog]autoScrollBodyContent error without giving actions props
I use "Dialog With Scrollable Content" code in http://material-ui.com/#/components/dialog If I don't give actions props, the chrome console display error message.
<Dialog autoDetectWindowHeight={true} autoScrollBodyContent={true} ref="noteDialog" title={this.props.noteText}>
<div style={{height: '2000px'}}>Really long content</div>
</Dialog>
node_modules\material-ui\lib\dialog.js:348 Uncaught TypeError: Cannot read property 'offsetHeight' of null
I'm experiencing the same problem.
Seems to be easy to fix though: @ dialog.jsx:331
if (this.props.actions) should be if (this.props.actions.length)
I can confirm this issue as well, and the proposed change seems to work fine. This bug (and the frequency of it) probably breaks all sites using scrollable bodies in dialogs. For instance on one of mine where I use a chain of promises, this bug triggers the catch handler more or less continously while entering data into a dialog (triggering re-rendering).
I found a way to get over this problem: Use actions={0} in your Dialog props and the error is gone. But I have made a fork with a fix and a pull request for it.
Thanks @corvuscornix
The change made by @corvuscornix was merged in #1717