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

Error thrown when creating second style #2369

Closed
Reinmar opened this issue Nov 8, 2016 · 3 comments
Closed

Error thrown when creating second style #2369

Reinmar opened this issue Nov 8, 2016 · 3 comments
Labels
package:autoformat type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Nov 8, 2016

I got the error while typing this text:

image

@szymonkups
Copy link
Contributor

szymonkups commented Nov 9, 2016

I took a while to debug this. It looks like it will be a renderer issue.
When first style is applied, view looks something like this:

<p>You can <strong>bold</strong>[]</p>

And inline filler is applied in the second text node (after </strong>).
When second attribute is applied:

<p>You can <strong>bold</strong> or <em>italicise</em></p>

Rendering occurs. At the begining, rendering checks if selection is in inline filler: https://github.com/ckeditor/ckeditor5-engine/blob/ceb51fa/src/view/renderer.js#L183

Renderer._isSelectionInInlineFiller is trying to translate view selection position into DOM position, (by using DomConverter.viewPositionToDom), but this is impossible because:

  • in the view we've already changed *italicize* to <em>italicize</em>,
  • there is no DOM corresponding element as it will be created later on during this rendering.

@Reinmar
Copy link
Member Author

Reinmar commented Nov 9, 2016

There's a chance that this issue will be fixed in ckeditor/ckeditor5-engine#676.

@Reinmar
Copy link
Member Author

Reinmar commented Nov 16, 2016

Fixed by ckeditor/ckeditor5-engine#676.

@Reinmar Reinmar closed this as completed Nov 16, 2016
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-autoformat Oct 9, 2019
@mlewand mlewand added this to the iteration 5 milestone Oct 9, 2019
@mlewand mlewand added type:bug This issue reports a buggy (incorrect) behavior. package:autoformat labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:autoformat type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

3 participants