Skip to content

Footnotes block not removing formatting after block is deleted from the editor #52176

@widoz

Description

@widoz

Description

Adding one or more footnotes in a page content the fn links format are not removed from the text if the footnotes block is deleted from the editor.

As additional note I see a strange behavior when I add a new note before an existing one, the block does not seems to reorder the internal list correctly.

Step-by-step reproduction instructions

For the block removing issue

  1. Create a new post or page and introduce a paragraph
  2. Select a portion of the paragraph and add a footnote
  3. Delete the Footnotes block

Result

  1. The fn elements are not removed from the paragraph
  2. The Front-end is not rendering the fn
  3. The Front-end is rendering asterisk

For the incorrect internal block list

  1. Create a new post or page and introduce a paragraph
  2. Select a portion of the paragraph and add a footnote
  3. Select another portion of the paragraph which exists before the already added footnote

Result

  1. The fn order looks correct but the block list order is incorrect and missing the new item

Screenshots, screen recording, code snippet

2023-06-30.15-05-42.mp4

And here how's look like on FrontOffice when the Footnotes block is not available.

image

Environment info

  • Gutenberg trunk up to date to dec307cff1 commit
  • Wordpress 6.3-beta2-56116
  • TwentyTwentyThree Theme (it's part of the wp-env)

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

[Block] FootnotesAffects the Footnotes Block[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions