WordPress.org

Make WordPress Core

Opened 22 months ago

Closed 22 months ago

Last modified 22 months ago

#41408 closed defect (bug) (fixed)

TinyMCE: Images with link and caption look "broken" when selected

Reported by: azaozz Owned by: azaozz
Milestone: 4.8.1 Priority: high
Severity: normal Version: 4.8
Component: TinyMCE Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

Happens when the image is set to display: block. That interferes with the zero width chars that are inserted when a link is selected.

Attachments (3)

caption-before.png (362.1 KB) - added by azaozz 22 months ago.
caption-after.png (320.9 KB) - added by azaozz 22 months ago.
41408.patch (750 bytes) - added by azaozz 22 months ago.

Download all attachments as: .zip

Change History (10)

@azaozz
22 months ago

#1 @azaozz
22 months ago

  • Keywords has-patch needs-testing added
  • Priority changed from normal to high

In 41408.patch: fix styling for images that have link and caption.

Thinking this should be considered for 4.8.1 as it is an annoying visual regression/bug. However it will need some testing in different themes as the CSS selectors are more specific in order to override themes that also set images with captions to display: block (that was already in the WP default editor styles, there was no need to repeat in themes).

#2 @westonruter
22 months ago

  • Owner set to azaozz
  • Status changed from new to assigned

#3 follow-up: @pento
22 months ago

  • Keywords commit added; needs-testing removed

Patch looks good.

Out of scope for this ticket, but it seems like there should be some sort of selector on dl.wp-caption when the image or caption are selected, and appropriate styling to show that you've selected part of a larger object.

#4 @westonruter
22 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 41141:

TinyMCE: Fix styling of selected state for linked images containing captions.

Props azaozz.
Fixes #41408.

#5 @westonruter
22 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

#6 @westonruter
22 months ago

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

In 41142:

TinyMCE: Fix styling of selected state for linked images containing captions.

Merges [41141] onto 4.8 branch.
Props azaozz.
Fixes #41408 for 4.8.1.

#7 in reply to: ↑ 3 @azaozz
22 months ago

Replying to pento:

...there should be some sort of selector on dl.wp-caption when the image or caption are selected, and appropriate styling to show that you've selected part of a larger object.

Yeah, that would be nice. Lets try it for 4.9, opened #41430 as a follow-up.

Note: See TracTickets for help on using tickets.