Make WordPress Core

Opened 6 years ago

Closed 4 years ago

#19645 closed defect (bug) (worksforme)

Image caption gets removed when editing image dimensions.

Reported by: JanJaapKempenaar Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Editor Keywords: dev-feedback
Focuses: Cc:


When editing an image placed into a post in a certain way, the caption of the image is removed.

Steps to reproduce:

  1. Edit a post that contains an included image.
  2. Click the edit options icon when selecting the image.
  3. Go to the advanced image settings(make sure the image does have a caption).
  4. Empty the width field.
  5. Press the submit button.

-> The caption of the image is set empty.

Remarks, In my case only leaving the width input field blank caused this issue.

Attachments (1)

19645.patch (788 bytes) - added by kurtpayne 6 years ago.

Download all attachments as: .zip

Change History (4)

#1 follow-up: @kurtpayne
6 years ago

  • Cc kpayne@… added
  • Keywords dev-feedback added

This is intentional, but I don't understand why. Perhaps another dev can shed some light on this.

editimage.dev.js line 366

if ( f.img_cap.value != '' && f.width.value != '' ) {
	do_caption = 1;
	img_class = img_class.replace( /align[^ "']+\s?/gi, '' );

#2 in reply to: ↑ 1 @azaozz
6 years ago

Replying to kurtpayne:

To be able to style the caption wrap div, we need the image width. The bug here is that we allow the image width field to be empty. Probably should populate it with the actual width when left empty and clicking submit.

6 years ago

#3 @azaozz
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This has been fixed for a while.

Note: See TracTickets for help on using tickets.