Opened 10 years ago

Closed 10 years ago

#3374 closed Bug (fixed)

Indenting list item remove subsequent item

Reported by: Josh Nisly Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.0
Component: General Version:
Keywords: Confirmed Review? Cc:

Description

  • Open the replace by class example.
  • Make the following content by using the Source button:
    <ul>
    	<li>
    		Item 1
    		<ul>
    			<li>
    				Item 2</li>
    			<li>
    				Item 3</li>
    		</ul>
    	</li>
    	<li>
    		Item 4<br />
    	</li>
    </ul>
    
  • Place the cursor after the 3 in "Item 3".
  • Choose increase indent. Expected result:
    <ul>
    	<li>
    		Item 1
    		<ul>
    			<li>
    				Item 2
    				<ul>
    					<li>
    						Item 3</li>
    				</ul>
    			</li>
    		</ul>
    	</li>
    	<li>
    		Item 4<br />
    	</li>
    </ul>
    
  • Actual result:
    <ul>
    	<li>
    		Item 1
    		<ul>
    			<li>
    				Item 2</li>
    			<li>
    				Item 3</li>
    		</ul>
    	</li>
    </ul>
    

This can be reproduced with any of the nightly samples.

Attachments (2)

3374.patch (1.4 KB) - added by Garry Yao 10 years ago.
3374_2.patch (789 bytes) - added by Garry Yao 10 years ago.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by Garry Yao

Keywords: Confirmed added
Milestone: CKEditor 3.0
Version: CKEditor 3.0 Beta 2

Changed 10 years ago by Garry Yao

Attachment: 3374.patch added

comment:2 Changed 10 years ago by Garry Yao

Keywords: Review? added
Owner: set to Garry Yao
Status: newassigned

comment:3 Changed 10 years ago by Martin Kou

Keywords: Review+ added; Review? removed

comment:4 Changed 10 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [3391]. Click here for more info about our SVN system.

comment:5 Changed 10 years ago by Garry Yao

Keywords: Review? added; Review+ removed
Resolution: fixed
Status: closedreopened

Changed 10 years ago by Garry Yao

Attachment: 3374_2.patch added

comment:6 Changed 10 years ago by Garry Yao

The trunk is broken caused by a logic error.

comment:7 Changed 10 years ago by Martin Kou

Hmm... I was aware of the fact that your simplification removed the nearestListBlock check in the while loop. But I though it was ok since it still worked in the list indent/outdent cases. But the error comes out when you are indenting normal blocks instead.

There should be no need to restore to the old, longer code. You can just change it to the following and it will work:

            while ( nearestListBlock && !( nearestListBlock.type == CKEDITOR.NODE_ELEMENT && listNodeNames[ nearestListBlock.getName() ] ) )
                nearestListBlock = nearestListBlock.getParent();

comment:8 Changed 10 years ago by Josh Nisly

Yes, in fact, that is the bug and fix reported here: #3398.

comment:9 Changed 10 years ago by Garry Yao

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy