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

Mobile: Splitting a Quote block citation results in nested cite tags #30548

Closed
guarani opened this issue Apr 6, 2021 · 2 comments · Fixed by #30645 or wordpress-mobile/gutenberg-mobile#3352
Labels
[Block] Quote Affects the Quote Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@guarani
Copy link
Contributor

guarani commented Apr 6, 2021

Description

When I split a Quote block citation (type some text in the citation and split it in the middle with a new line), two new lines are created.

Step-by-step reproduction instructions

  1. Add a quote block
  2. In the citation section, type a few words
  3. In the middle of the citation, hit return
  4. Notice that two new lines are created instead of a single one

Expected behaviour

Typing enter in a quote citation should just create a new line.

Actual behaviour

Typing enter in a quote citation create what looks like two new lines. Inspecting the editor HTML contents reveals that extra <cite> tags – and extra <p> tags – are added.

<!-- wp:quote -->
<blockquote class="wp-block-quote">
   <p></p>
   <cite>
      <p><cite>This is </cite></p>
      <p><cite><br></cite></p>
      <p><cite>a citation</cite></p>
   </cite>
</blockquote>
<!-- /wp:quote -->

Screenshots or screen recording (optional)

Screen Shot 2021-04-06 at 17 50 37

Device information

  • Device: iPhone 11
  • Operating system: iOS 14
  • WordPress app version: 17.1.0.0 (also seen in Gutenberg demo app commit e7369c0)

I haven't tested Android or other block yet to see if they are affected.

@guarani guarani added [Type] Bug An existing feature does not function as intended Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Block] Quote Affects the Quote Block labels Apr 6, 2021
@guarani guarani added the [Type] Regression Related to a regression in the latest release label Apr 6, 2021
@jd-alexander
Copy link
Contributor

I did a test of this with Android and I did not notice this behavior. I tested using 17.1-rc-1

@guarani
Copy link
Contributor Author

guarani commented Apr 7, 2021

Adding more info (thanks to @ceyhun for digging into this): The change that caused this regression is 54d6668 (part of #30190). Specifically it's this prop that's now passed to the <RichText> component that powers the quote citation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Quote Affects the Quote Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
2 participants