Open
Description
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [3.5.0]
Expected / Desired Behavior / Question
Nothing happens.
Observed Behavior
The application crashes (react crashes), with message:
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.
Crashes here, at the row 867, this.setState
:
sp-dev-fx-controls-react/src/controls/richText/RichText.tsx
Lines 854 to 873 in 2f28397
Steps to Reproduce
Quickly (milliseconds) click in the RichText text control several times, like five or so (using left mouse button).
The rich text should not be empty (should contain some formatted text, such as a hyperlink)
It looks like the handler just enters the infinite loop, maybe a safeguard around it could solve it.