Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting not applied to first letter of new caption #2334

Closed
mchowning opened this issue May 28, 2020 · 2 comments · Fixed by WordPress/gutenberg#22741
Closed

Formatting not applied to first letter of new caption #2334

mchowning opened this issue May 28, 2020 · 2 comments · Fixed by WordPress/gutenberg#22741
Assignees
Labels
[Pri] High [Type] Bug Something isn't working

Comments

@mchowning
Copy link
Contributor

Describe the bug

I'm seeing a regression with image and video block captions where the formatting buttons do not update and the first character is not formatted when the caption is initially selected. It seems that this only happens the very first time text is added to a caption—once text has been added to the caption I do not see the issue anymore, even if I delete all the text and apply formatting to the now-empty caption.

I have reproduced this on both iOS and Android when testing 54de16f in preparation for the 1.29.0 release. I do not see this issue with other rich text blocks. I cannot reproduce this with the current 14.9 alpha-224 release, so I believe this is a regression.

Steps to Reproduce

  1. Create a new image/video block with an image/video so the caption can be selected
  2. Select the caption
  3. Activate the bold, italic, or strikethrough formatting buttons
  4. Observe that the format button's state does not update
  5. Begin typing text
  6. Observe that after the first character, the formatting buttons update their state, and all the text after the first character has the formatting applied

Expected behavior

Applying formatting on a new caption should be reflected in the state of the format buttons and any active formats should be applied to the first character that is typed.

image_caption_formatting_issue mp4

Smartphone (please complete the following information):

  • Device: iPhone XS Simulator, Pixel
  • OS: iOS 13, Android 10
  • Version 54de16f
@mchowning mchowning added the [Type] Bug Something isn't working label May 28, 2020
@mchowning
Copy link
Contributor Author

mchowning commented May 29, 2020

👋 @dratwas ! It looks like this started occurring after we merged the list optimization PR. Wondering if you could take a look at this? Maybe you'll have some ideas for how to fix it. 🙂

If we can find a reasonably safe fix quickly we may want to include it in the 1.29.0 release.

@mchowning mchowning mentioned this issue May 29, 2020
5 tasks
@dratwas
Copy link
Contributor

dratwas commented May 29, 2020

Hey @mchowning I'm on it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] High [Type] Bug Something isn't working
Projects
None yet
2 participants