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

Wrong numbering for list items at the end of list when added again (numbered and reversed). #11408

Closed
mmotyczynska opened this issue Mar 4, 2022 · 0 comments · Fixed by #11424
Assignees
Labels
package:list squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@mmotyczynska
Copy link
Contributor

mmotyczynska commented Mar 4, 2022

📝 Provide detailed reproduction steps (if any)

  1. Create an ordered list which starts from 5 (or a reversed list, because there is the same issue):

2. select two (or more) list items from the end and use the numbered list button to change them to paragraphs:

3. Use the same button to change them back to list items.

✔️ Expected result

The numbered list looks like at the beginning, is numbered from 5.

The reversed list is still reversed.

❌ Actual result

The list is numbered from 1 in both cases: numbered list and reversed list.

❓ Possible solution

I noticed that in the model, the last two items get wrong listStart attribute value (1 instead of 5), whilst the first three list items have this attribute set to 5. In case of reversed list, the last two list items get listReversed attribute value set two false, whilst the rest have this attribute set to true.

📃 Other details

  • Browser: All
  • OS: …
  • First affected CKEditor version: …
  • Installed CKEditor plugins: …

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

@mmotyczynska mmotyczynska added type:bug This issue reports a buggy (incorrect) behavior. package:list labels Mar 4, 2022
@CKEditorBot CKEditorBot added the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Mar 7, 2022
oleq added a commit that referenced this issue Mar 8, 2022
…fixer-fix

Fix (list): List properties should remain the same after a paragraph following a list is toggled into a list item. Closes #11408.
@CKEditorBot CKEditorBot removed the status:in-progress Set automatically when an issue lands in the "In progress" column. We are working on it. label Mar 8, 2022
@CKEditorBot CKEditorBot added this to the iteration 52 milestone Mar 8, 2022
@Reinmar Reinmar added the squad:core Issue to be handled by the Core team. label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:list squad:core Issue to be handled by the Core team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants