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

Adding an image block after an image aligned to the side produces unexpected behavior #6634

Closed
LZL0 opened this issue May 8, 2018 · 8 comments
Labels
[Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended
Milestone

Comments

@LZL0
Copy link

LZL0 commented May 8, 2018

Issue Overview

Adding an image block after an image aligned to the side produces unexpected behavior resulting in the misplacement of the second image and all other boxes after the second image.

Steps to Reproduce (for bugs)

  1. Create an image block, align it to the left
  2. Create another image block, leave it as is, don't apply an alignment
  3. Try to create a rich text field

Tested with Chrome 67 and Opera 53 (Chrome 66).

Expected Behavior

The second image should be displayed properly (including the resize dots and "Write caption..." text) and the rich text block should be placed after the second image.

Current Behavior

The added (second) resize handlers and the "Write caption..." text is on the top in line with the first image, while the image is displayed below the first image block. If there meta boxes are present the second image will be displayed behind them. After adding a paragraph to the bottom of the post it will be then placed somewhere inside the second image.
Important: Interestingly, the problem will not occur until the secondary image is selected from the media gallery/uploaded.

Screenshots / Video

https://www.youtube.com/watch?v=bta1vBdC0cc
https://youtu.be/UmHcQpGXOtw

The same thing occurs if the second image block is set to "center."

@LZL0
Copy link
Author

LZL0 commented May 8, 2018

Found the possible source of the issue. When I get back I will add a pull request for it.

@danielbachhuber danielbachhuber added this to the Merge Proposal: Editor milestone May 10, 2018
@danielbachhuber danielbachhuber added Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended labels May 10, 2018
@danielbachhuber
Copy link
Member

Thanks for the report, @LZL0.

#4127 is related. I believe the true source of the problem is that we don't know what our expected behavior is. Specifically, whether: 1) blocks should clear one another, or 2) it should be possible to align blocks around one another. We need to make this decision before we can identify the appropriate fix.

@LZL0
Copy link
Author

LZL0 commented May 10, 2018

I respectfully disagree. My apologies for not uploading a video explaining the issue.
This, of course, is just a possible solution to the issue.
https://youtu.be/JOobYdR1Ihs

@danielbachhuber
Copy link
Member

I respectfully disagree.

Which part do you disagree with? The video you've uploaded doesn't appear to be playable.

@LZL0
Copy link
Author

LZL0 commented May 10, 2018

@danielbachhuber
Copy link
Member

Ok. Here's what I see in your screencast:

image

Specifically, when an Image Block is inserted into the editor and then aligned to the left, any blocks inserted after it look all sorts of broken. Is this an accurate description of the issue you're experiencing?

If so, #4127 and #4010 are related because, conceptually, we need to decide whether blocks can be floated to the left or right of one another. My feeling is no, we'll clear floats after each block, and use nested blocks for a more grid-like experience.

@LZL0
Copy link
Author

LZL0 commented May 10, 2018

That's also a possible solution. It is a rare issue, but needs to be sorted.

@karmatosed
Copy link
Member

It seems that #4127 and #4010 are where the focus for this should be, unless I am mistaken? I feel clearing floats makes sense and in this case with nesting and the adaptions that gives we're moving away from this as an issue. For now closing, but we can always reopen.

@designsimply designsimply added [Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed and removed Needs Design Feedback Needs general design feedback. labels Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Duplicate Used to indicate that a current issue matches an existing one and can be closed [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants