Skip to content
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

It's hard to escape from link areas #1016

Closed
ghost opened this issue May 8, 2018 · 11 comments · Fixed by #7440
Closed

It's hard to escape from link areas #1016

ghost opened this issue May 8, 2018 · 11 comments · Fixed by #7440
Assignees
Labels
package:link status:discussion support:2 An issue reported by a commercially licensed client. type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@ghost
Copy link

ghost commented May 8, 2018

🆕 Feature request

💻 Version of CKEditor

ckeditor5/10.0.0
classic build

📋 Steps to reproduce

  1. type a text
  2. mark the last word and make it a link\
  3. continue typing
  4. now we are still in the link and need to type right 2 times to escape of the link

✅ Expected result

if i continue to type i would not expect to enlarge the link area i just defined. It would be totally o.k. to redo the link actions if i need to change this.

❎ Actual result

I'm prisoner of a link and had much difficulties to find out how to escape.

📃 Other details that might be useful

none... just change it please. And thank you for your great work!

@scofalik
Copy link
Contributor

scofalik commented May 8, 2018

If I understood you correctly, this is an expected behavior - a feature, rather than a bug. This way we are giving the user a possibility - to write inside or outside the link - when the caret is at the end of it. Highlight behind the link denotes whether the caret is inside the link or not. We could discuss if this should be a configurable option but the gain provided by this feature is much bigger than the loss.

@ghost
Copy link
Author

ghost commented May 8, 2018

My concern on this is that the majority of Users will not understand why they have to double tap the right button to continue writing as normal. Well its only a Problem if you mark the last text symbols and make it a link and then try to write further without expanding the link. double Tap right is not really intuitive. i pressed space escape, but nothing helped. If it would be the bold or italic button you just hit it again. with links its more complicated. So, yes its a very unexpected behavior. Not a Bug.
I think this should be a configurable option if not the default, in my opinion this would be much easier for the non experts out there.

greetings, Ralf

@scofalik
Copy link
Contributor

scofalik commented May 8, 2018

I agree that at the end of the block it might be less intuitive to discover this feature. Thanks for your input. We'll discuss what to do next.

@Reinmar
Copy link
Member

Reinmar commented May 14, 2018

The problem is that both options are bad:

  • not typing with a link when at the end of it – because it does not let you edit the text link,
  • typing with a link when at the end of it – because it does not let you type something after the link.

In CKEditor 4 we have the 1st situation and it's irritating. It forces you to do some odd things to change the text of a link. In CKEditor 5 we had the 2nd situation and it also forced you to do odd things (this time – to type without a link).

When looking for the default behaviour we may need to understand which of these is a lesser evil. Because, if we assume that the user is not aware of the two-step caret movement, we also assume that the problems described above will occur. Either one of them or the other.

I agree that we could e.g. change the behaviour (the gravity of the selection) on user click, so when the user clicked at the end of a link, the selection would not inherit the link. But to make a decision, we need to get more feedback to not change something bad into something even worse.

@Reinmar Reinmar added type:improvement This issue reports a possible enhancement of an existing feature. status:discussion package:link labels May 14, 2018
@ghost
Copy link
Author

ghost commented May 17, 2018

After some thinking about it, i would suggest a combination of both behaviors, the caret could be placed just right outside of the link, so you can type further without the need of do anything else, but if i want to expand the link i have to place the caret with mouse or keyboard inside the link, if i do i do it intentional. In my Opinion that would be a great option.

@Reinmar Reinmar modified the milestones: backlog, unknown May 17, 2018
@theigl
Copy link

theigl commented Aug 5, 2019

I'd be very interested in the solution suggested by @ralfbeine or in a configurable option to place the caret after the link.

@Reinmar: Is there any workaround I can use for now until this is implemented? I tried manually triggering an arrow-right keyboard event on the source element but that doesn't work.

@jswiderski
Copy link

jswiderski commented Aug 28, 2019

I had the same idea as @ralfbeine - put caret outside of the link by default but also leave the current implementation where you can enter the link using mouse or arrow keys. This will allow users to type standard text or enter the link if they want to further edit it.

@christinecha
Copy link

The expected behavior, for me, would be that:

  • If your cursor is at the start/end of a link, assume the user wants to now insert plain text. This is a much more common case than editing the actual link text.
  • If your cursor is inside the link somewhere, now you can assume the user wants to change the link text.
  • If the user would like to change text at the very beginning or end of the link text (a much less common case), they would have to insert their cursor somewhere inside the existing link text, add their changes, then delete the last/first character.

I believe this is how things work in Google Docs as well as many other editors I've used.

@lslowikowska lslowikowska added the support:2 An issue reported by a commercially licensed client. label Aug 29, 2019
@Reinmar Reinmar changed the title Its hard to escape from link areas. Its hard to escape from link areas Sep 2, 2019
@Reinmar Reinmar changed the title Its hard to escape from link areas It's hard to escape from link areas Sep 2, 2019
@wwalc
Copy link
Member

wwalc commented Dec 10, 2019

Okay, I just faced the same issue as others. My use case:

I'm writing a text and then hit the "Link" button, type https://ckeditor.com (the domain name that I know, I did not copy it from anywhere), click "Save".

I'm inside the link so I press arrow right (to escape from the selection), space (to get out of the link).

Conclusion: maaaaybe we should consider something like user intention or sth. I just inserted a link, the link is at the end of the paragraph, in 99.9999% of cases I simply want to type plain text after it. Pressing arrow right twice is counter intuitive in this case.

@scofalik
Copy link
Contributor

There are two things here:

  1. You should be able to do that simply pressing right arrow key. No doubt about it. In this regard, I'd consider current situation a bug.
  2. The other thing is behavior of the feature after you add a link. I personally don't like that the whole link is selected and there's tooltip shown. I'd be perfectly fine if the selection is collapsed after the link (so that you also don't write in a link).

@wwalc
Copy link
Member

wwalc commented Dec 10, 2019

@scofalik

The other thing is behavior of the feature after you add a link. I personally don't like that the whole link is selected and there's tooltip shown. I'd be perfectly fine if the selection is collapsed after the link (so that you also don't write in a link).

+1

jodator added a commit that referenced this issue Jun 17, 2020
Other (link): The selection after inserting a link will land after the inserted element. Thanks to that a user will be able to type directly after the link without extending the link element. Closes #1016.

Other (link): After clicking at the beginning or end of the link element, the selection will land before/after the clicked element. Thanks to that a user will be able to typing before or after the link element as normal text without extending the link. See #1016.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:link status:discussion support:2 An issue reported by a commercially licensed client. type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants