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

Infinite recursion on Multiline Text Field - "Maximum update depth exceeded." #11132

Closed
xlthor opened this issue Apr 24, 2018 · 5 comments
Closed
Assignees
Labels
bug 🐛 Something doesn't work component: TextareaAutosize The React component.

Comments

@xlthor
Copy link

xlthor commented Apr 24, 2018

screenshot-2018-4-25 create-react-app - codesandbox

On FF 59.0/64bit/Win 10 with a multiline input, hitting the first input char, the error occurs:
There's an update / rendering recursion which gets caught with "Maximum update depth exceeded."

Chrome, IE, Edge are fine so far, only FF 59.0 is affected!

Expected Behavior

Multiline fields work smoothly in any current browser

Current Behavior

the issue can be reproduced by this link https://codesandbox.io/s/3222mr5ywp
in FF 59.0 (!) on Win 10:
as soon as the first char is type in the field, the update recursion starts and ends with "Maximum update depth exceeded"

Steps to Reproduce (for bugs)

https://codesandbox.io/s/3222mr5ywp

The problem seem to be related to maxRows and rows properties. Ass soon as the only maxRows is defined and rows is missing or less than maxRows, the issue occurs.

Context

Multiline Textfield is unusable in current FF Version 59.0

Your Environment

Tech Version
Material-UI [email protected]
React 16.0.0
browser FF 59.0 64bit
OS Win 10 64bit
webpack 4.6.0
@oliviertassinari
Copy link
Member

Is this a duplicate of #8741?

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Apr 24, 2018
@xlthor
Copy link
Author

xlthor commented Apr 24, 2018

#8741 has been closed and is missing some more detailed descriptions of a possible root cause.

@jollyBaker
Copy link

I had the same bug with the multiLine TextField in a Dialog, I "solved" this by using a fixed number of rows. But would appreciate a proper solution as well :)

@xlthor
Copy link
Author

xlthor commented Apr 25, 2018

@jollyBaker yepp, same "solution" here:

if ( this.browser && this.browser.name == 'firefox' ) {
          rowsProps = {
                  rowsMax: 4,
                  rows: 4,
          }
      }

@oliviertassinari oliviertassinari self-assigned this Apr 25, 2018
@oliviertassinari
Copy link
Member

oliviertassinari commented Apr 25, 2018

The infinit loop is coming from:

capture d ecran 2018-04-25 a 23 41 29

console.log('syncHeightWithShadow', this.state.height, newHeight)

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

No branches or pull requests

3 participants