Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#26108 closed defect (bug) (fixed)

Twenty Fourteen: editor doesn't align right image properly

Reported by: rdall's profile RDall Owned by: lancewillett's profile lancewillett
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.8
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

In the content area of the post you can insert an image and then make it align right and it will fall off the page on the left.

It doesn't seem to matter if are aligning the image with text or not.

See Screenshot:
http://cl.ly/image/3v0j2f243u2k

Attachments (1)

26108.diff (397 bytes) - added by RDall 10 years ago.
Props to Andrew Ozz for the suggested patch…

Download all attachments as: .zip

Change History (12)

#1 @obenland
10 years ago

I can't reproduce it. Could you provide more detailed instructions on how to reproduce?

#2 @RDall
10 years ago

Ok @obenland try this

  1. Take Image for example http://test.32spokes.com/wp-content/uploads/2013/11/Cenotaph01.jpg-web.jpg
  1. Insert to post at full size (bug doesn't appear at medium or small)
  1. align right.

I have reproduced this on three different builds now on two difference machines. Also it doesn't matter if it is horizontal or vertical. But only if it is full size selection? See Screenshot http://cl.ly/image/0F2f0b0M0S3D But the full size is only 600 X 800 px.

But the full res image selection shows fine in the actual post. See post here http://test.32spokes.com/?p=80

Does that help more? I could record a screen cast if needed… 

#3 @NikV
10 years ago

Tried using all the steps and getting the same bug.

#4 @iamtakashi
10 years ago

This is just because the image for the example is wider than the column width (474px). So this is expected behavior.

Suggesting close this as invalid.

#5 @lancewillett
10 years ago

  • Keywords needs-patch removed
  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

#6 @RDall
10 years ago

Ok Can you explain this behavior to me?

  1. I upload a horizontal image of 1024px in width which is far greater then 474px you have suggested.
  1. When I say full size and place in the content area It reduces the full size image to 474px. In the content editor and in the post itself.
  1. I then click align left and it aligns left but doesn't move or resize because it is the width of the content area. Which is and (correct me if I am wrong) intended action.
  1. I then click align right and the enter image disappears from the content page. You can't click on it you can't highlight and you certainly can't removed the alignment.
  1. I clicked update and view the post the image is exactly where it is suppose to be. It's even got some nice text wrapping around it.
  1. I go back to the content editor and there is a large white hole where the image should be. But I see for a second the full size of the image before it disappears.
  1. I click text view and it shows me the image, caption and align right. I remove the align right and the photo re-appears in the content area like it did in point number 3.

If you want to see the setups I went through to reproduce this I have a screenscast here:
http://cl.ly/47271T3Q1Z0Q
(It's a minute long, so it might need some time to load, it clearly show the steps the produce the blug)

Whatever is causing this issue it just doesn't seem right to me. Also how is a user going to get his image back if he clicks align right with out the knowledge of going into the text editor and manually changing the align?

Last edited 10 years ago by RDall (previous) (diff)

#7 @RDall
10 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

#8 @azaozz
10 years ago

Confirmed, happens only on images with captions. Caused by missing max-width on .wp-caption in editor-style.css. The patch is to add this on line 357:

max-width: 474px;

@RDall
10 years ago

Props to Andrew Ozz for the suggested patch… 

#9 @SergeyBiryukov
10 years ago

  • Milestone set to Awaiting Review

#10 @lancewillett
10 years ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 3.8

#11 @lancewillett
10 years ago

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from reopened to closed

In 26409:

Twenty Fourteen: fix image alignment in editor styles, props azaozz and RDall. Fixes #26108.

Note: See TracTickets for help on using tickets.