Opened 12 years ago

Closed 12 years ago

#4784 closed Bug (fixed)

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 (3)

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

Download all attachments as: .zip

Change History (15)

comment:1 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.1CKEditor 3.2

comment:2 Changed 12 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.2CKEditor 3.3

comment:3 Changed 12 years ago by Garry Yao

Keywords: Confirmed added
Version: SVN (CKEditor)3.0

Similar with #4851.

comment:4 Changed 12 years ago by brooks

Owner: set to brooks

comment:5 Changed 12 years ago by brooks

Status: newassigned

Changed 12 years ago by brooks

Attachment: 4784.patch added

comment:6 Changed 12 years ago by brooks

Keywords: Review? added; Confirmed removed

comment:7 Changed 12 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 12 years ago by brooks

Attachment: 4784_2.patch added

comment:8 Changed 12 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 12 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 12 years ago by brooks

Attachment: 4784_3.patch added

comment:10 Changed 12 years ago by brooks

Keywords: Review? added; Review- removed

nice suggest!

comment:11 in reply to:  10 Changed 12 years ago by Garry Yao

Keywords: Review+ added; Review? removed

Congs! The codes looks much neater.

comment:12 Changed 12 years ago by brooks

Keywords: confirm added
Resolution: fixed
Status: assignedclosed

fixed with 5352

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