Empty link in a block cannot be removed until it's fixed with a proper destination #69481
Open
3 of 6 tasks
Labels
[Type] Bug
An existing feature does not function as intended
Description
What happens:
When there is an empty link, clicking on the link icon should remove the link without having to configure a proper destination first.
In some cases, the 'unlink' icon shows in the toolbar, and in other environments, it doesn't. The behavior should be consistent, especially when the link assignment is incorrect or incomplete.
Step-by-step reproduction instructions
Create a new post.
Add a paragraph block and ensure that a link is added which is not redirecting to any URL - an empty link.
Click on the link to unlink the text.
Unlinking can only occur after an actual link is added to the text, and the unlink icon where it shows, does so after an actual link is added.
For Testing:
I am not sure what causes a empty link to exist in the first place, but here is a test block you can reproduce the issue with:
Screenshots, screen recording, code snippet
https://cloudup.com/cEqcgqrwpEs
https://cloudup.com/cFfUILwYKKz
Environment info
Tested with both Gutenberg 19.8 and 20.3.0.
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: