Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#9063 closed Bug (fixed)

Font styling lost on sub-lists when the indent on the parent list is decreased

Reported by: Teresa Monahan Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.6.4
Component: Core : Lists Version: 3.6.4
Keywords: IBM Cc: Damian, Satya Minnekanti

Description

To reproduce:

  • Copy the following into the Source view of the editor:
<ul style="font-size: 10px;">
	<li>Level 1 - size 10
		<ul style="font-size: 24px;">
			<li>Level 2 - size 24</li>
		</ul>
	</li>
	<li>Level 1 - size 10</li>
</ul>

  • Switch to wysiwyg mode and select the entire editor contents.
  • Select 'Decrease Indent' on the toolbar. The margin of both lists will be decreased and the level 1 list will no longer be a list.

Expected result: The level 2 list should remain a list and should keep its font styling.

Actual result: The level 2 list remains as a list but its font styling is lost.

The markup after the 'Decrease Indent' action looks like:

<p>
	Level 1 - size 10</p>
<ul>
	<li>Level 2 - size 24</li>
</ul>
<p>
	Level 1 - size 10</p>

It should be:

<p>
	Level 1 - size 10</p>
<ul style="font-size: 24px;">
	<li>Level 2 - size 24</li>
</ul>
<p>
	Level 1 - size 10</p>

Attachments (2)

9063.patch (3.5 KB) - added by Garry Yao 12 years ago.
9063_2.patch (2.8 KB) - added by Garry Yao 12 years ago.

Download all attachments as: .zip

Change History (12)

Changed 12 years ago by Garry Yao

Attachment: 9063.patch added

comment:1 Changed 12 years ago by Garry Yao

Owner: set to Garry Yao
Status: newreview

comment:2 Changed 12 years ago by Garry Yao

Component: GeneralCore : Lists

comment:3 Changed 12 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

This test fails after patch: http://ckeditor.t/tt/8997/1.html

comment:4 Changed 12 years ago by Garry Yao

Milestone: CKEditor 3.6.4

Changed 12 years ago by Garry Yao

Attachment: 9063_2.patch added

comment:5 Changed 12 years ago by Garry Yao

Status: review_failedreview

comment:6 Changed 12 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

comment:7 Changed 12 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [7522].

comment:8 in reply to:  7 Changed 12 years ago by Teresa Monahan

Replying to garry.yao:

Fixed with [7522].

The supplied fix results in the following HTML after the 'Decrease Indent' action:

<p style="font-size: 10px;">
	Level 1 - size 10</p>
<ul style="font-size: 24px;">
	<li>Level 2 - size 24</li>
</ul>
<p style="font-size: 10px;">
	Level 1 - size 10</p>

The problem with this is that the font-size is not reflected in the toolbar for the paragraph elements. Even if the user does change the font size on the paragraph text, the original font-size will still remain on the P element:

<p style="font-size: 10px;">
	<span style="font-size:14px;">Level 1 - size 10</span></p>

Can this font-size be moved into a span tag for the paragraph contents instead when the list is outdented, so that the font-size is reflected on the toolbar? i.e.

<p>
	<span style="font-size:10px;">Level 1 - size 10</span></p>
<ul style="font-size: 24px;">
	<li>Level 2 - size 24</li>
</ul>
<p>
	<span style="font-size:10px;">Level 1 - size 10</span></p>

If this is too complex a change right now, would it be possible to only keep the font-size style for UL and OL elements? i.e.

<p>
	Level 1 - size 10</p>
<ul style="font-size: 24px;">
	<li>Level 2 - size 24</li>
</ul>
<p>
	Level 1 - size 10</p>

comment:9 Changed 12 years ago by Jakub Ś

@tmonahan I have moved your comment to new ticket #9076.

Let's consider this one as fixed and continue in that other ticket.

comment:10 Changed 12 years ago by Garry Yao

The unexpected style inheritance is now reverted with [7535].

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