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

Allow distinguishing between "cursor inside/outside inline code" (same as for links) #6722

Closed
neongreen opened this issue May 3, 2020 · 6 comments · Fixed by #7577
Closed
Assignees
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:basic-styles type:improvement This issue reports a possible enhancement of an existing feature.

Comments

@neongreen
Copy link

📝 Provide a description of the improvement

Currently, if you are at the end of a link, you can press Right Arrow once to "escape" it and type outside of the link. The link is highlighted when I'm inside it, but not when I'm outside. This is very convenient.

It would be great to have the same behavior for inline code. The only other editor I know that does this is the one used by Bitbucket. In this demo, note how I can escape the <code> merely by pressing Right Arrow.

2020-05-03 16 25 46


If you'd like to see this improvement implemented, add a 👍 reaction to this post.

@neongreen neongreen added the type:improvement This issue reports a possible enhancement of an existing feature. label May 3, 2020
@neongreen
Copy link
Author

neongreen commented May 3, 2020

Also note how in Bitbucket the cursor position doesn't change when I escape <code> — it is still visually inside the code. I wonder if it's possible to make it visually outside in CKEditor.

@Reinmar
Copy link
Member

Reinmar commented May 4, 2020

👍 We've been discussing enabling two-step caret movement for <code>s. That's the solution used for links and we can have the same for <code> elements. Would that be fine?

BTW, I think you can enable it already by using https://ckeditor.com/docs/ckeditor5/latest/api/module_engine_utils_bindtwostepcarettoattribute.html#static-function-bindTwoStepCaretToAttribute.

@Reinmar Reinmar added domain:ui/ux This issue reports a problem related to UI or UX. package:basic-styles labels May 4, 2020
@Reinmar Reinmar added this to the next milestone May 4, 2020
@neongreen
Copy link
Author

Sounds awesome

@oleq
Copy link
Member

oleq commented May 14, 2020

I stumbled upon this issue a few times while using the https://github.com/ckeditor/github-writer. I think this is pretty annoying and we should finally address the problem.

@Reinmar
Copy link
Member

Reinmar commented May 14, 2020

I don't think that we'll manage this in the current iteration because we have a full backlog already. But it's on our short priority list so it'd end up in June's iteration.

Unless, of course, you wanna help us ;)

@tomalec
Copy link
Contributor

tomalec commented Jul 8, 2020

There are two new PRs for this change:

Both are ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:ui/ux This issue reports a problem related to UI or UX. package:basic-styles type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
4 participants