-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Link Control: Creating Empty Text Link from Selection says link is empty #58415
Comments
I think this might be due to the caret being placed outside of the link edge instead of inside of it. When creating a link with a selection, it places the cursor at the inside edge of the linked text. When creating it from an empty selection, it places it on the outside edge. Screen.Recording.2024-02-06.at.1.37.49.PM.mov |
I think we should place the caret outside the link and not show the Link UI when the link was created with no selection. That as opposed to fixing this by placing the caret inside the crested link. |
I believe a big part of this redone link creation UX was for the link preview to remain open after link creation. I believe it remains open after selected text links, so it should probably work the same way. @richtabor, can you confirm? |
Curious why you would treat link creation with text selection and no text-selection differently? |
Because without text selection the link inserting operation is in the writing flow, while with text selection the flow is interrupted to apply a format. In select text > apply format flow we also move focus away from the content to the UI, which for inserting a link while writing would be very jarring. |
Ok cool. That's fine, let's try that and see how it feels in practice. |
Description
When creating a new link without any highlighted text, the preview says link is empty.
I suspect the same root issue for this is the same root issue for #58325
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: