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

Ordering problem when block quote is being inserted into the middle of the list #11082

Closed
dufipl opened this issue Jan 7, 2022 · 3 comments · Fixed by #12419
Closed

Ordering problem when block quote is being inserted into the middle of the list #11082

dufipl opened this issue Jan 7, 2022 · 3 comments · Fixed by #12419
Assignees
Labels
intro Good first ticket. package:list squad:collaboration Issue to be handled by the Collaboration team. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@dufipl
Copy link
Contributor

dufipl commented Jan 7, 2022

📝 Provide detailed reproduction steps (if any)

  1. Prepare six lines of text
  2. Create numbered list (one number for each text line)
  3. Select lines 3 and 4 and add a "Block quote"
  4. Change the order of the list in the block quote.

✔️ Expected result

Order changes only in the block quoted list.

❌ Actual result

Order changes are also in the list below.
block quote order issue
Changing the order of the list above or below the block quote impacts only desired list.

📃 Other details

Browser: Chrome, Firefox, Safari
OS: Mac Os Monterey
First affected CKEditor version: 31.1.0


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

@dufipl dufipl added the type:bug This issue reports a buggy (incorrect) behavior. label Jan 7, 2022
@Mgsy Mgsy added package:list squad:core Issue to be handled by the Core team. labels Jan 7, 2022
@CatStrategist CatStrategist added the intro Good first ticket. label Jan 12, 2022
@CatStrategist
Copy link
Contributor

CatStrategist commented Jan 12, 2022

Possible issue is in a getSiblingNodes() in list utils.

@t-mangoe
Copy link

I did some research on this issue.
It seems that when a block quote is inserted, the ol tag that makes up the list is split into two.
It looks like this.

Before inserting:

<ol>
  <li>aaa</li>
  <li>bbb</li>
  <li>ccc</li>
  <li>ddd</li>
</ol>

After inserting:

<ol>
  <li>aaa</li>
  <li>bbb</li>
</ol>
<blockquote>block quoting<blockquote>
<ol>
  <!-- the order of the list is restarted from the beginning. -->
  <li>ccc</li>
  <li>ddd</li>
</ol>

It may be necessary to prevent the ol tag from being split into two.

@scofalik scofalik added squad:collaboration Issue to be handled by the Collaboration team. and removed squad:core Issue to be handled by the Core team. labels Sep 2, 2022
@Reinmar
Copy link
Member

Reinmar commented Sep 2, 2022

Usually we use Schema#getSelectedBlocks() that trims the trailing block if the selection starts at the very beginning of it. Here, as you can see, blockquote uses this method but there's a chance that the "reversed order" feature does not. Disclaimer: I haven't seen any code, just base on my experience.

@CKEditorBot CKEditorBot added the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Sep 5, 2022
DawidKossowski added a commit that referenced this issue Sep 6, 2022
@CKEditorBot CKEditorBot removed the status:planned Set automatically when an issue lands in the "Sprint backlog" column. We will be working on it soon. label Sep 6, 2022
scofalik added a commit that referenced this issue Sep 6, 2022
…h-block-quoted-list

Fix (list): List properties changes made on a list inside a container element (e.g. block quote) were incorrectly propagated also to a list directly after that container. Closes #11082.
@CKEditorBot CKEditorBot added this to the iteration 57 milestone Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intro Good first ticket. package:list squad:collaboration Issue to be handled by the Collaboration team. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants