fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

ScrollablePane Component: Maximum update depth exceeded error causes page to crash

Open mtsamis2 opened this issue 6 years ago • 3 comments

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:

  1. 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.

  1. On your CodePen tab, set your browser zoom level to 80%

  2. 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 () at ScrollablePaneBase._this.notifySubscribers (https://unpkg.com/office-ui-fabric-react@7/dist/office-ui-fabric-react.js:55053:36) at ScrollablePaneBase.Fabric../lib/components/ScrollablePane/ScrollablePane.base.js.ScrollablePaneBase.componentDidUpdate (https://unpkg.com/office-ui-fabric-react@7/dist/office-ui-fabric-react.js:55311:18) at https://unpkg.com/office-ui-fabric-react@7/dist/office-ui-fabric-react.js:10744:56

The above error occurred in the component: in ScrollablePaneBase (created by StyledScrollablePaneBase) in StyledScrollablePaneBase (created by ScrollablePaneDetailsListExample) in div (created by ScrollablePaneDetailsListExample) in ScrollablePaneDetailsListExample (created by ScrollablePaneDetailsListExampleWrapper) in div (created by FabricBase) in FabricBase (created by StyledFabricBase) in StyledFabricBase (created by ScrollablePaneDetailsListExampleWrapper) in ScrollablePaneDetailsListExampleWrapper

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 avatar Aug 27 '20 19:08 mtsamis2

@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 avatar Aug 28 '20 15:08 paulgildea

@paulgildea any updates about this? I`m facing the same issue

denikqwerty avatar Dec 11 '20 12:12 denikqwerty

Closing in favor of #16654 which is a duplicate.

khmakoto avatar Mar 19 '21 19:03 khmakoto