Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#27922 closed defect (bug) (fixed)

Adding caption to aligned image bumps it down a paragraph

Reported by: adamcapriola's profile AdamCapriola Owned by: nacin's profile nacin
Milestone: 3.9.1 Priority: normal
Severity: normal Version: 3.9
Component: Editor Keywords: has-patch fixed-major commit
Focuses: Cc:

Description

Step 1: I insert an image into the beginning of a paragraph (aligned right) in the visual editor.

http://i.imgur.com/ADf87f2.png

Step 2: I add a caption.

http://i.imgur.com/bmvKoJn.png

Step 3: The image has now been bumped down to the next paragraph.

http://i.imgur.com/YHCRnup.png

The image would stay aligned in the original paragraph prior to 3.9.

Attachments (1)

27922.patch (888 bytes) - added by azaozz 10 years ago.

Download all attachments as: .zip

Change History (12)

@azaozz
10 years ago

#1 @azaozz
10 years ago

  • Milestone changed from Awaiting Review to 3.9.1

Confirmed. This is a change of behavior, somewhat border case. Only happens if a caption is added after inserting an right-aligned image in an existing paragraph. Works as expected if the caption is set when inserting the image. To reproduce:

  • Type a paragraph of text.
  • Click at the beginning or in the middle of it.
  • Insert an image that is floated right.
  • Add a caption to the image.

27922.patch should fix it. Moving to 3.9.1 for consideration.

#2 @iseulde
10 years ago

  • Keywords has-patch added

This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.


10 years ago

#4 @seanchayes
10 years ago

I tested this following the steps in the original ticket and found that the image did indeed jump down/away from where it was originally positioned once the caption was added.

I then applied the patch and repeated the steps, inserting the image and then clicking on it to add a caption. I found that the image stayed where it was expected/intended/inserted.

This ticket was mentioned in IRC in #wordpress-dev by nacin1. View the logs.


10 years ago

#6 @azaozz
10 years ago

In 28190:

TinyMCE: when adding a caption to an image that is in a paragraph with other text, move the caption node above the paragraph instead of below. See #27922, for trunk.

#7 @samuelsidler
10 years ago

  • Keywords fixed-major commit added

This ticket was mentioned in IRC in #wordpress-dev by c3mdigital. View the logs.


10 years ago

#9 @nacin
10 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 28231:

TinyMCE: When adding a caption to an image that is in a paragraph with other text, move the caption node above the paragraph instead of below.

Merges [28190] to the 3.9 branch.

props azaozz.
fixes #27922.

#10 @iseulde
10 years ago

[28231] also fixes #28061 for 3.9.

#11 @ocean90
10 years ago

#28061 was marked as a duplicate.

Note: See TracTickets for help on using tickets.