Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#41408 closed defect (bug) (fixed)

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

Reported by: azaozz's profile azaozz Owned by: azaozz's profile 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 7 years ago.
caption-after.png (320.9 KB) - added by azaozz 7 years ago.
41408.patch (750 bytes) - added by azaozz 7 years ago.

Download all attachments as: .zip

Change History (10)

@azaozz
7 years ago

@azaozz
7 years ago

@azaozz
7 years ago

#1 @azaozz
7 years 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
7 years ago

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

#3 follow-up: @pento
7 years 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
7 years 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
7 years ago

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

#6 @westonruter
7 years 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
7 years 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.