-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
[Block] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Feature] HistoryHistory, undo, redo, revisions, autosave.History, undo, redo, revisions, autosave.[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
As noted in #29739, there is an undesirable quirk with the current implementation of the Table of Contents block:
When a Table of Contents block is present, every letter typed in a Heading block counts as a separate undo step, in contrast to the default behavior of multiple letters typed in sequence being combined into a single undo step. This only affects typing in Heading blocks; other blocks continue to behave as expected, with whole strings of sequentially typed text counted as a single undo step as expected.
Unfortunately, I am not aware of any way to fix this, so I could use some expert technical help here.
Step-by-step reproduction instructions
- Insert a Table of Contents block.
- Insert a Heading block.
- Type "Hello world" into the Heading block.
- Click the "Undo" button in the main toolbar of the editor.
- Notice that each undo step removes a single character, instead of the entire sequence of typed text.
Screenshots, screen recording, code snippet
No response
Environment info
- WP 6.0-alpha-52828
- Gutenberg
trunk
as of ff56d57
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] Table of contents (experimental)Affects the Table of contents BlockAffects the Table of contents Block[Feature] HistoryHistory, undo, redo, revisions, autosave.History, undo, redo, revisions, autosave.[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended