-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Open
Labels
Needs DevReady for, and needs developer effortsReady for, and needs developer efforts[Block] HeadingAffects the Headings BlockAffects the Headings Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
I wrote a comment on the feature pull request about a week ago but given it's already a closed pull request it likely got lost.
There's currently some issues with the autogenerated heading anchors that are increasingly frustrating as someone who has been building a website with the latest version of Gutenberg with this feature in place.
- There is a bug where if you write a heading and then duplicate that block the old id is retained even if you change the text for the duplicated heading.
- It doesn't take into consideration ids from different editor settings (such as widgets) so you can end up with duplicate ids on the page from the main editor and widgets. If you were also to use a block template theme that would increase to 3 different areas that can produce duplicate ids.
- There is currently no flag to disable the functionality. Not speaking as someone who does this, but I can see this having negative consequences on websites where people have used ids for JavaScript hooks or styling the template, and the generated ids have the potential to completely break the website.
Step-by-step reproduction instructions
See above.
Screenshots, screen recording, code snippet
No response
Environment info
No response
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
Soean, skorasaurus, rocket-martue, ddryo, shimotmk and 6 more
Metadata
Metadata
Assignees
Labels
Needs DevReady for, and needs developer effortsReady for, and needs developer efforts[Block] HeadingAffects the Headings BlockAffects the Headings Block[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended