-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Is there an existing issue for this?
- I have searched the existing issues
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.
Screenshots or screen recording (optional)
Screen.Capture.on.2021-08-03.at.14-46-05.mp4
Code snippet (optional)
No response
WordPress Information
No response
Gutenberg Information
No response
What browsers are you seeing the problem on?
No response
Device Information
No response
Operating System Information
No response