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

Images and embeds do not work #7707

Closed
tofumatt opened this issue Jul 4, 2018 · 5 comments · Fixed by #7710
Closed

Images and embeds do not work #7707

tofumatt opened this issue Jul 4, 2018 · 5 comments · Fixed by #7710
Assignees
Labels
[Priority] High Used to indicate top priority items that need quick attention
Milestone

Comments

@tofumatt
Copy link
Member

tofumatt commented Jul 4, 2018

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"

To Reproduce
Steps to reproduce the behavior:

  1. Edit a post or create a new post
  2. Add an image block
  3. Select an element from the media library
  4. See error

Expected behavior
You see the image.

Screenshots
2018-07-04 15 08 05

Happens on master.

@tofumatt tofumatt added the [Priority] High Used to indicate top priority items that need quick attention label Jul 4, 2018
@tofumatt tofumatt added this to the 3.2 milestone Jul 4, 2018
@tofumatt tofumatt self-assigned this Jul 4, 2018
@tofumatt
Copy link
Member Author

tofumatt commented Jul 4, 2018

(Worried that e2e tests didn't catch this one 😓)

@tofumatt
Copy link
Member Author

tofumatt commented Jul 4, 2018

8b21632 is the problem commit says git bisect

@tofumatt tofumatt mentioned this issue Jul 4, 2018
4 tasks
@tofumatt
Copy link
Member Author

tofumatt commented Jul 4, 2018

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

@nerrad
Copy link
Contributor

nerrad commented Jul 4, 2018

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.

@tofumatt
Copy link
Member Author

tofumatt commented 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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] High Used to indicate top priority items that need quick attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants