Skip to content

Unexpected type with link on keyboard move #7459

Closed
@jodator

Description

@jodator

📝 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.

Activity

added
type:bugThis issue reports a buggy (incorrect) behavior.
type:regressionThis issue reports a bug that was not present in the previous releases.
on Jun 18, 2020
Reinmar

Reinmar commented on Jun 19, 2020

@Reinmar
Member

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

Reinmar commented on Jun 19, 2020

@Reinmar
Member

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.

added this to the nice-to-have milestone on Jun 19, 2020
Reinmar

Reinmar commented on Jun 19, 2020

@Reinmar
Member

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.

removed
type:regressionThis issue reports a bug that was not present in the previous releases.
on Jun 19, 2020
jodator

jodator commented on Jul 20, 2020

@jodator
ContributorAuthor

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

added a commit that references this issue on Jul 27, 2020

Merge pull request #7714 from ckeditor/i/7459

1ddb955
modified the milestones: nice-to-have, iteration 35 on Jul 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

package:linktype:bugThis issue reports a buggy (incorrect) behavior.

Type

No type

Projects

No projects

Relationships

None yet

Participants

@Reinmar@jodator@pomek

Issue actions

    Unexpected type with link on keyboard move · Issue #7459 · ckeditor/ckeditor5