Make WordPress Core

Opened 2 years ago

Last modified 23 months ago

#56024 new defect (bug)

Removing a caption's contents removes the image alignment

Reported by: eagleharborsolutions's profile eagleharborsolutions Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0
Component: General Keywords:
Focuses: administration Cc:

Description

To reproduce this bug: first, insert an aligned image with a caption in either the classic WYSIWYG or a classic WYSIWYG block. Next, hit backspace to delete the caption within the editor. The image appears to remain properly aligned in the editor, but once you save/publish, the alignment is lost.

Change History (3)

#1 @juhise
2 years ago

Hey @eagleharborsolutions

Thanks for reporting the issue. You are right removing the caption removes the image alignment too.

Test Report

Env

  • WordPress 6.0
  • Chrome 102.0.5005.115
  • MacOS Monterey
  • Theme: Twenty Twenty two
  • Gutenberg Editor, Classic Block

Steps to test

  1. Add a classic block and add Media
  2. Add caption and alignment to image
  3. Publish the post, will appear as expected
  4. Now remove the caption and publish
  5. Aligmnet will reset to default

#2 follow-up: @omarelhawary
2 years ago

Hello @eagleharborsolutions,

Thanks for noticing this bug.

I was able to repoduce the issue in the same steps as @juhise already mentioned.

Please check the attached screenshots for clarification.

Regards

Image with Caption: https://ibb.co/nBX9Dnh

Caption Removed: https://ibb.co/GQ71Gk1

Last edited 2 years ago by omarelhawary (previous) (diff)

#3 in reply to: ↑ 2 @eagleharborsolutions
23 months ago

Yes, this is correct. Thanks for verifying.

Note: See TracTickets for help on using tickets.