You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Image and embed blocks added to the page will cause an error and the following browser console output TypeError: "this.props.forwardedRef is not a function"
Going back to the check for this.props.forwardRef used in #6261 (comment) "fixes" it, which indicates the ref forwarding isn't working or as @aduth mentioned in Slack might not be working when no refs are assigned to be forwarded...
Ya the issue here is that there is probably something else using withGlobalEvents that is not setting a ref which gets forwarded. So there must be a check to see if there is a forwarded ref before acting on it. Definitely the solution is to add back in the if ( this.props.forwardedRef ) check in handleRef.
Activity
tofumatt commentedon Jul 4, 2018
(Worried that e2e tests didn't catch this one 😓)
tofumatt commentedon Jul 4, 2018
8b21632 is the problem commit says
git bisecttofumatt commentedon Jul 4, 2018
Going back to the check for
this.props.forwardRefused in #6261 (comment) "fixes" it, which indicates the ref forwarding isn't working or as @aduth mentioned in Slack might not be working when no refs are assigned to be forwarded...nerrad commentedon Jul 4, 2018
Ya the issue here is that there is probably something else using
withGlobalEventsthat is not setting a ref which gets forwarded. So there must be a check to see if there is a forwarded ref before acting on it. Definitely the solution is to add back in theif ( this.props.forwardedRef )check inhandleRef.tofumatt commentedon Jul 4, 2018
Yeah after running through the code that still seems to be the best option, and I can't see it breaking anything. Patch incoming...
fix: Check for forwardedRef in withGlobalEvents
fix: Check for forwardedRef in withGlobalEvents (#7710)