Opened 3 years ago

Last modified 3 years ago

#11954 confirmed Bug

Invalid selection after deleting a table.

Reported by: Marek Lewandowski Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

After removing a table selection is being placed in buggy place, in addition to that editor seems to lose the focus.

  1. open any sample with CKEditor (i.e. samples/replacebyclass.html)
  2. switch to source and use following source code:
    <h1>foobar</h1>
    
    <p><strong>Apollo 11</strong> was the spaceflight that landed the first humans,</p>
    
    <table border="1" cellpadding="1" cellspacing="1" style="width:500px">
    	<tbody>
    		<tr>
    			<td>&nbsp;</td>
    			<td>&nbsp;</td>
    		</tr>
    	</tbody>
    </table>
    
    <table border="1" cellpadding="1" cellspacing="1" style="width:500px">
    	<tbody>
    		<tr>
    			<td>&nbsp;</td>
    			<td>&nbsp;</td>
    		</tr>
    	</tbody>
    </table>
    
    <p>Armstrong spent about...</p>
    
  3. switch back to wysiwyg mode
  4. remove second table, with one of two options:
    1. right click with your mouse, and use "Delete Table" option
    2. navigate selection using keyboard inside the table, press shift + f10 and use "Delete Table"

Expected result:

  1. Table should be removed.
  2. Selection should be collapsed, and moved at the beginning of next element:
    ^Armstrong spent (...)
    
  3. Editor should keep focus
  4. No empty line should be visible.

Current result:

  1. editor leaves a temporary empty line, where selection is put
  2. editor loses focus

additional info:

  1. I've experienced it in FF and Chrome @Win7
  2. This seems to be not a (recent) regression, because I've been able to repro it in 4.2.3

Change History (3)

comment:1 Changed 3 years ago by Marek Lewandowski

Description: modified (diff)

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

Description: modified (diff)
Status: newconfirmed

comment:3 Changed 3 years ago by Jakub Ś

Version: 4.0

Problem can be reproduced from CKEditor 4.0 (works fine in 4.0 beta). Affected browsers are FF, Blink and Webkit.

Note: This might be "browser version" dependent because in my case focus wasn’t lost. Cursor was blinking in place of the deleted table (Empty space is not remove automatically - you need to click somewhere else) instead of ^Amstrong

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