ckeditor / ckeditor5-inspector

CKEditor 5 inspector.
https://ckeditor.com/ckeditor-5
Other
32 stars 8 forks source link

Selection is being displayed incorrectly around the `linkHref` nodes #88

Open pomek opened 4 years ago

pomek commented 4 years ago

Something wrong happens around links. Check out screenshots attached in the issues listed below:

oleq commented 4 years ago

Can you write this as expected vs actual? I'm having a hard time figuring out what the problem is.

pomek commented 4 years ago

In both cases, editor's selection is at the end of a link. The inspector shows it outside, in the next node.

oleq commented 4 years ago

There's no such thing as a selection in the textnode in the model. <$text linkHref>foo[]</$text> and <$text linkHref>foo</$text>[] are one and the same position. So from this perspective, the inspector does not lie.

What could be improved, though, is the normalization of the caret rendering because I admit this could be annoying in certain situations.