You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add "unlink" button to Block toolbar when link UI is open #33850
[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intended
Have you tried deactivating all plugins except Gutenberg?
I have tested with all plugins deactivated.
Have you tried replicating the bug using a default theme e.g. Twenty Twenty?
I have tested with a default theme.
Description
When editing links in the Nav Block and the link UI is open you should be able to click the link icon and have it unlink the link (remove). Currently it just re-toggles the link UI which is unexpected (and pointless 😄 ).
As per my recent PR to add a Unlink button to the link UI, let's add the same functionality in the Block Toolbar but ONLY when the link UI is open (otherwise it's impossible to trigger the link UI to appear once you've added link!).
Step-by-step reproduction instructions
Add Nav Block.
Add link.
Click on link to open the Link UI.
Click on "link" icon in the block toolbar.
See it doesn't not unlink but instead re-toggles the Link UI.
Expected Behavior
Clicking the link icon (which should be an unlink icon) when there is a current link and the link UI is open should remove the link.
Current Behavior
Clicking the link icon (which should be an unlink icon) when there is a current link and the link UI is open re-toggles the link UI and does nothing.
[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intended
Activity
getdave commentedon Nov 16, 2021
Now fixed thanks to x2 options for unlinking.