Opened 13 years ago

Closed 12 years ago

#7105 closed Bug (invalid)

Table moved to top of document when list is created on selection.

Reported by: Krzysztof Studnik Owned by:
Priority: Normal Milestone:
Component: Core : Lists Version: 3.0
Keywords: Cc:

Description

Test case for numbered list:

  • Create 3 paragraphs
  • Set cursor at the end of second paragraph
  • Insert default table

Table is created between second and third paragraph

  • Select first two paragraphs and convert them to list
  • select paragraph below table and convert it to list item.

I wanted continuous numbers above and below table, so in Source, I deleted/commented first </ol> and second <ol>, so the result should be as follows:


  1. test1
  2. test2
  3.    
       
       
  4. test3

  • Switch back to WYSIWYG: The table is moved to top of document.
    <table border="1" cellpadding="1" cellspacing="1" style="width: 500px">
    	<tbody>
    		<tr>
    			<td>
    				&nbsp;</td>
    			<td>
    				&nbsp;</td>
    		</tr>
    		<tr>
    			<td>
    				&nbsp;</td>
    			<td>
    				&nbsp;</td>
    		</tr>
    		<tr>
    			<td>
    				&nbsp;</td>
    			<td>
    				&nbsp;</td>
    		</tr>
    	</tbody>
    </table>
    <ol>
    	<li>
    		test1</li>
    	<li>
    		test2<!-- </ol> deleted --><!-- <ol> deleted --></li>
    	<li>
    		test3</li>
    </ol>
    

Similar result happens on "Select all" and next Numbered/Bullet list

Change History (2)

comment:1 Changed 13 years ago by Krzysztof Studnik

Status: newconfirmed

comment:2 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: confirmedclosed

But li elements are inline and table are block-level elements. You can't have block-level element in inline element. When you switch to source and back CKEditor fixes invalid code - this is correct behaviour.

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