Opened 11 years ago
Last modified 8 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 )
- Open editor with no content
- Focus editor
- Click few times "Increase indent"
- Click "Insert/Remove ordered list"
- 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 11 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |
Summary: | Switching to source mode modify source on indented list → Margin 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 11 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 11 years ago by
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.
Related: #11803