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
[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditable[Type] TaskIssues or PRs that have been broken down into an individual action to take
Describe the bug
When trying to remove a link, emptying the placeholder/value of the URL in the link should work.
To reproduce
Steps to reproduce the behavior:
Edit an existing link, aiming to remove the link
Empty the value of the URL in the link, and try to "submit" this change
Expected behavior
The editor will prompt the user to add a "Please fill in this field". I would expect that submitting an empty value on a link would remove the link.
Screenshots
Editor version (please complete the following information):
WordPress 5.5.1
The described behaviour happens both with and without the plugin installed (v 9.0.0)
Desktop (please complete the following information):
OS: MacOs High Sierra 10.13.6
Google Chrome 85.0.4183.102
Additional context
I have found several people struggling to remove a link, expecting that removing the URL would just remove the link.
Just to add context on this issue, and why I believe it is more than just an enhancement, if the block being edited is at the very bottom of the viewport (which can be a fairly common scenario) the block toolbar will be obscured by the URL box, making it effectively impossible for the user to remove the link:
I recently experienced a similar problem to this when I'd selected the whole of a paragraph to be the link.
Clicking anywhere in the paragraph block displayed the dialog which obscured most of the toolbar.
There were a couple of ways around the problem.
Use Top toolbar.
Scroll the paragraph using a mouse so that the toolbar stops at the top and the link popup moves to the end of the link.
This issue is now largely solved by the Unlink button that's been added to the Link UI itself.
The trouble with allowing a user to delete and then submit "empty" to remove is that it's ambigious. In most cases we don't want the user to submit empty content as that could create an empty link. Indeed I'm working on a fix right now that disables such behaviour.
@mrfoxtalbot Would you say this is a big issue now the Unlink button exists? If so please do go ahead and close this out.
[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Feature] Rich TextRelated to the Rich Text component that allows developers to render a contenteditable[Type] TaskIssues or PRs that have been broken down into an individual action to take
Activity
mrfoxtalbot commentedon Sep 20, 2020
Thank you for labelling this, @youknowriad.
Just to add context on this issue, and why I believe it is more than just an enhancement, if the block being edited is at the very bottom of the viewport (which can be a fairly common scenario) the block toolbar will be obscured by the URL box, making it effectively impossible for the user to remove the link:
mrfoxtalbot commentedon Sep 20, 2020
I realize that, given the additional context, it might be a good idea to rename the issue.
ntsekouras commentedon Sep 23, 2020
Related: #18866
bobbingwide commentedon Dec 19, 2020
I recently experienced a similar problem to this when I'd selected the whole of a paragraph to be the link.

Clicking anywhere in the paragraph block displayed the dialog which obscured most of the toolbar.
There were a couple of ways around the problem.
getdave commentedon Sep 23, 2021
This issue is now largely solved by the
Unlinkbutton that's been added to the Link UI itself.The trouble with allowing a user to delete and then submit "empty" to remove is that it's ambigious. In most cases we don't want the user to submit empty content as that could create an empty link. Indeed I'm working on a fix right now that disables such behaviour.
@mrfoxtalbot Would you say this is a big issue now the
Unlinkbutton exists? If so please do go ahead and close this out.mrfoxtalbot commentedon Sep 24, 2021
Thank you @getdave! Yes, I think that the new "Unlink" button pretty much solves this. I am closing this now.