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

<ul> and <ol> elements are inserted before ui elements #2990

Closed
scofalik opened this issue Jul 25, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-list#72
Closed

<ul> and <ol> elements are inserted before ui elements #2990

scofalik opened this issue Jul 25, 2017 · 0 comments · Fixed by ckeditor/ckeditor5-list#72
Assignees
Labels
package:list type:bug This issue reports a buggy (incorrect) behavior.
Milestone

Comments

@scofalik
Copy link
Contributor

Assume this view state:

<ul>
  <li>Foo<span class="myUi"></span></li>
  <li>Bar</li>
</ul>

Now, a user indents second item. What happens then is:

  1. <li>Bar</li> is extracted.
  2. It is wrapped into <ul>.
  3. It is inserted into view, inside "Foo" <li>.

Unfortunately it is inserted at wrong position. Lists have that characteristic, that in <li>, no other node should be after <ul> or <ol>. When insertion position is mapped from model to view, it is before Foo text node and <span> ui element. The result is this:

<ul>
  <li>
    Foo
    <ul>
      <li>Bar</li>
    </ul>
    <span class="myUi"></span>
  </li>
</ul>

This is a very different structure. Now ui element is not "after Foo" but "after Bar". Also, depending on CSS styles, it may display in a weird way.

@scofalik scofalik self-assigned this Jul 25, 2017
Reinmar referenced this issue in ckeditor/ckeditor5-list Jul 25, 2017
Fixed: `<ul>` and `<ol>` view elements will now be inserted after view UI elements. Closes #71.
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-list Oct 9, 2019
@mlewand mlewand added this to the iteration 11 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:bug This issue reports a buggy (incorrect) behavior. package:list labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
2 participants