Fix footnotes's subscript numbering on para delete and undone#70911
Fix footnotes's subscript numbering on para delete and undone#70911USERSATOSHI wants to merge 1 commit intoWordPress:trunkfrom
Conversation
|
@USERSATOSHI, the numbering seems to be working correctly - #60050 (comment). |
Hi I seem to still able to reproduce this issue cc: @Mamaduka |
|
@USERSATOSHI, can you share your reproduction steps and maybe a screen recording in the issue? |
|
I was able to reproduce this via Following steps
Screen.Recording.2025-07-28.at.1.02.48.PM.movcc: @Mamaduka EDIT: Formatting. |
|
Was also able to get this only works if adding and deleting is done without saving first Steps:
Screen.Recording.2025-07-28.at.1.12.04.PM.movcc: @Mamaduka EDIT: Formatting |
|
Okay, I can reproduce it, but it's not very consistent. The only consistent way I found was to add an empty paragraph after the Footnotes block, then delete and undo the change. I think this suggests that a more subtle bug is at play. It would be great to track down exactly why this is happening and create an end-to-end test that fails on the trunk but passes with the fix. ScreenshotCleanShot.2025-07-28.at.11.53.15.mp4 |
|
What I wanted to say is that the bug has concrete steps to reproduce and doesn't always affect the footnotes. Let's investigate why it's happening under those conditions and not otherwise, before we proceed. |
Got it, I will post my findings on the issue itself so others can also join in on the discussion. cc: @Mamaduka |

What?
Closes #60050
This PR fixes the footnote numbers being incorrect when paragraphs are deleted and undone.
Why?
Currently when we delete paragraph containing the footnote and undo it the numbering on subscript gets broken
Example
How?
This PR fixes this by updating useEntityBlockEditor to check if blocks contain footnotes and if it does then update the blocks to match current footnotes.
Testing Instructions
Screenshots or screencast
Screen.Recording.2025-07-25.at.8.43.47.PM.mov