ScrollablePane Component: Maximum update depth exceeded error causes page to crash
Environment Information
- Package version(s): office-ui-fabric-react 7
- Browser and OS versions: Latest version of Chrome on Windows 10
- Browser must have zoom level set to 80% to replicate this issue!
Please provide a reproduction of the bug in a codepen:
Steps to replicate:
- In the ScrollablePane documentation here:
https://docs.microsoft.com/en-us/javascript/api/examples/scrollablepane?view=office-ui-fabric-react-latest
Export the codepen for the "DetailsList Locked Header" example.
-
On your CodePen tab, set your browser zoom level to 80%
-
Scroll all the way to the bottom of the DetailsList. May need to scroll up as well after reaching the bottom.
You will see the output of CodePen suddenly disappear. If you open the browser console. you'll see the following errors:
Uncaught Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
at invariant (https://unpkg.com/[email protected]/umd/react-dom.development.js:49:15)
at scheduleWork (https://unpkg.com/[email protected]/umd/react-dom.development.js:20051:5)
at Object.enqueueSetState (https://unpkg.com/[email protected]/umd/react-dom.development.js:11304:5)
at Sticky.Component.setState (https://unpkg.com/[email protected]/umd/react.development.js:423:16)
at Sticky._this._onScrollEvent (https://unpkg.com/office-ui-fabric-react@7/dist/office-ui-fabric-react.js:59730:23)
at https://unpkg.com/office-ui-fabric-react@7/dist/office-ui-fabric-react.js:55055:21
at Set.forEach (
The above error occurred in the
Actual behavior:
The application crashes.
Expected behavior:
Scrolling up and down the list should work without crashing.
Priorities and help requested:
Requested priority: High
Products/sites affected: This bug was reported by multiple users of my company's application.
@mtsamis2 Thanks for the feedback.
@dzearing - Do we have any specific support for fundamentally supporting arbitrary zoom levels? Strange this happens at 80% zoom.
@paulgildea any updates about this? I`m facing the same issue
Closing in favor of #16654 which is a duplicate.