-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make linking only work when you have selected text #5960
Comments
Perhaps instead of only showing the link icon when text is selected, make it clickable only when text is selected. That way people know they have the ability to add a link, but can't accidentally add a link to a section of no text. Getting rid of it when nothing is selected could be confusing. |
@twsp I am ok with greying it out if there is enough contrast. I don't absolutely think it would be confusing to show contextual actions, we do that in a lot of places. I'm up for either option, the action of not having it working is the experience I'm focused on. |
Hmmm great idea! Let's have that as the option, it makes a lot of sense over the nothing entry. Thanks for the suggestion! |
Perhaps in addition to this, there's an issue where the selection disappears when you enter the link modal: This is likely due to focus having to be there, and when you set focus elsewhere, the previous selection is unset. Maybe. In any case, it looks like the classic editor solves this by immediately inserting a link placeholder, as soon as you create a link: Bundle a fix for that one into this? :) 🍒 |
@jasmussen: Yeah, that's something that was originally a part of #4572. I ran into a lot of pain (see #4909 (comment)) while implementing it though and so I gave up... for now. I'll create a seperate issue so that we remember to address this before merge 🙂 |
Right now you can add a link on no text. This is an existing limitation in WordPress, the blocks makes this even more of an issue as more and more won't be interacting or correcting this via code.
Whilst I understand this may be an issue with Tiny MCE, what about taking this a little further and only showing the link icon if you have selected text?
The text was updated successfully, but these errors were encountered: