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

Unexpected type with link on keyboard move #7459

Closed
jodator opened this issue Jun 18, 2020 · 4 comments · Fixed by #7714
Closed

Unexpected type with link on keyboard move #7459

jodator opened this issue Jun 18, 2020 · 4 comments · Fixed by #7714
Assignees
Labels
package:link type:bug This issue reports a buggy (incorrect) behavior.

Comments

@jodator
Copy link
Contributor

jodator commented Jun 18, 2020

📝 Provide detailed reproduction steps (if any)

  1. Insert <softBreak> after a link.
  2. Move selection somewhere else.
  3. Move selection back after the <softBreak>.

✔️ Expected result

You should type without link (the linkHref attribute is not set on selection).

❌ Actual result

You can type with link.

📃 Other details

  • CKEditor version: latest master

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@jodator jodator added type:bug This issue reports a buggy (incorrect) behavior. package:link type:regression This issue reports a bug that was not present in the previous releases. squad:blue labels Jun 18, 2020
@Reinmar
Copy link
Member

Reinmar commented Jun 19, 2020

Support for soft breaks was added after the support for two-step caret movement and quite recently in general, so I'd guess we didn't test the editor for this.

@Reinmar
Copy link
Member

Reinmar commented Jun 19, 2020

Sorry, I got it now – it only happens when there's no text after the caret. This is a bit special case. Perhaps it's a symmetrical behavior to this:

Note that if there was a text before the caret then you wouldn't have bold enabled:

So, in some cases, the gravity automatically changes to right. Perhaps it somehow leaks to the case with a soft break. As I mentioned, soft breaks were added recently and for a long time we didn't have support for inline elements so I guess we did consider such a case where an inline element needs to stop the search for a neighbour text node.

@Reinmar Reinmar added this to the nice-to-have milestone Jun 19, 2020
@Reinmar
Copy link
Member

Reinmar commented Jun 19, 2020

BTW, this doesn't seem to be a regression. I checked it on https://ckeditor.com/docs/ckeditor5/15.0.0/examples/builds/classic-editor.html and it occurred there too.

@Reinmar Reinmar removed the type:regression This issue reports a bug that was not present in the previous releases. label Jun 19, 2020
@jodator
Copy link
Contributor Author

jodator commented Jul 20, 2020

Might be a case that searching for attributes does not stop on inline objects.

jodator added a commit that referenced this issue Jul 27, 2020
Fix (engine): Selection will not inherit attributes if spotted an inline element while searching for a node from which attributes could be copied. Closes #7459.

Tests (enter): Added an integration test that covers a bug with copying attributes from a node before an inline element. See #7459.
@jodator jodator modified the milestones: nice-to-have, next, iteration 35 Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:link type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants