Opened 10 years ago

Last modified 7 years ago

#11802 confirmed Bug

Margin is set on list item when creating list from indented paragraph

Reported by: Artur Delura Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

  1. Open editor with no content
  2. Focus editor
  3. Click few times "Increase indent"
  4. Click "Insert/Remove ordered list"
  5. Switch to source mode:
<ul>
	<li style="margin-left: 120px;">Foo</li>
	<li>Bar</li>
</ul>

Expected:

<ul style="margin-left: 120px;">
	<li>Foo</li>
	<li>Bar</li>
</ul>

Reasoning

Paragraph's margin should be moved to ol/li when creating list, because this is where indent/outdent buttons add/remove margin when you have a caret in the first item of a list.

However, I'm not sure what if we're creating list out of few paragraphs when each have different margin. I think that in such case it's best to remove those margins and "normalize" the situation. Otherwise, we'd have to go crazy and e.g. create sublists based on indentation of following paragraphs, but that would be a waste of time and we don't know if user wanted to do that anyway.

Alternatively, we can simply remove all margins when creating list, because none of the solutions seem to be 100% correct. Everyone can have different idea about how that should work.

Change History (6)

comment:1 Changed 10 years ago by Artur Delura

Description: modified (diff)

comment:2 Changed 10 years ago by Artur Delura

Related: #11803

comment:3 Changed 10 years ago by Piotrek Koszuliński

Description: modified (diff)
Status: newconfirmed
Summary: Switching to source mode modify source on indented listMargin is set on list item when creating list from indented paragraph
Version: 4.1

I rephrased the ticket, because the issue occurs earlier that previously described.

comment:4 Changed 10 years ago by Piotrek Koszuliński

Description: modified (diff)

comment:5 Changed 10 years ago by Jakub Ś

on indentation of following paragraphs, but that would be a waste of time and we don't know if user wanted to do that anyway.

User can think of it both ways - either editor should reset indentation (why do I have to do it myself) or editor should create list from it. Hmm... but who will create lists in such way when one have list tool? The second case is really an edge case.

Perhaps another approach could be taken because I agree with Arthur’s expected result: When list is created on one indented paragraphs margin should be assigned to ol/ul

  • When list is created on many indented paragraphs margin from first paragraph should be assigned to ol/ul

If above approach isn't good I would simply reset lists to no margin.

comment:6 Changed 7 years ago by Jakub Ś

Other tickets with same source of the problem but slightly different TC's: #9901, #7640, #14399.

It may be possible that this issue has same source of the problem: #8058

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy