Ticket #4784 (closed Bug: fixed)

Opened 5 years ago

Last modified 5 years ago

Incorrect cursor position after delete table cells

Reported by: garry.yao Owned by: brooks
Priority: Normal Milestone: CKEditor 3.3
Component: General Version: 3.0
Keywords: confirm Review+ Cc:

Description

Reproducing Procedures

  1. Open 'replacebyclass' sample page insert an default table.
  2. Click inside one of the table cell and open context menu on it.
  3. Click 'Cell->Delete Cells' to remove it.
  • Actual Result: The cursor is not blinking at the same position agreed on all browsers, especially for some one the cursor is lost.

Attachments

4784.patch (1.7 KB) - added by brooks 5 years ago.
4784_2.patch (2.4 KB) - added by brooks 5 years ago.
4784_3.patch (2.3 KB) - added by brooks 5 years ago.

Change History

comment:1 Changed 5 years ago by fredck

  • Milestone changed from CKEditor 3.1 to CKEditor 3.2

comment:2 Changed 5 years ago by fredck

  • Milestone changed from CKEditor 3.2 to CKEditor 3.3

comment:3 Changed 5 years ago by garry.yao

  • Keywords Confirmed added
  • Version changed from SVN (CKEditor) to 3.0

Similar with #4851.

comment:4 Changed 5 years ago by brooks

  • Owner set to brooks

comment:5 Changed 5 years ago by brooks

  • Status changed from new to assigned

Changed 5 years ago by brooks

comment:6 Changed 5 years ago by brooks

  • Keywords Review? added; Confirmed removed

comment:7 Changed 5 years ago by garry.yao

  • Keywords Confirmed Review- added; Review? removed
  1. Load the following content and selection into editor in Firefox:
    	<table>
    		<tr><td>[cell1]</td><td>cell2</td></tr>
    		<tr><td>[cell3]</td></tr>
    	</table>
    
  2. Delete the selected cells using context menu.
  • Expected Result: Cursor is blinking inside 'cell2'.
  • Actual Result: Cursor is not blinking any more.

Changed 5 years ago by brooks

comment:8 Changed 5 years ago by brooks

  • Keywords Review? added; Confirmed Review- removed

update for 2 bugs:

  1. fix the algorithm for find the first focusable cell.
  1. if the last cell was deleted, delete the whole table.

comment:9 Changed 5 years ago by garry.yao

  • Keywords Review- added; Review? removed
  1. fix the algorithm for find the first focusable cell.

With more robust logic right now, the patch increases the complexity of the cells deletion to O(n2) because of the 'indexOf' search, It's our common practice to use this way to filtering unwanted nodes, which could reduce to linear O(2n).

Changed 5 years ago by brooks

comment:10 follow-up: ↓ 11 Changed 5 years ago by brooks

  • Keywords Review? added; Review- removed

nice suggest!

comment:11 in reply to: ↑ 10 Changed 5 years ago by garry.yao

  • Keywords Review+ added; Review? removed

Congs! The codes looks much neater.

comment:12 Changed 5 years ago by brooks

  • Status changed from assigned to closed
  • Keywords confirm added
  • Resolution set to fixed

fixed with 5352

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