Opened 12 years ago

Closed 12 years ago

#1323 closed Bug (fixed)

Table and P Delete bug in fckenterkey.js (DoDelete)

Reported by: Scott McNaught Owned by:
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: UI : Enter Key Version: SVN (FCKeditor) - Retired
Keywords: Cc:

Description

To replicate:

Set the source to:

<table width="400">

<tbody> <tr>

<td>Cell 1</td> <td> <p>Press delete -&gt;</p> </td>

</tr> <tr>

<td>Cell 2</td> <td>Cell 3</td>

</tr> </tbody>

</table>

Press delete at the end of the top right cell.

The problem occurs in: FCKEnterKey.prototype.DoDelete at var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ], ['UL','OL'] ) ;

eNext is a TR element which is then passed into _ExecuteBackspace, causing the cells to merge up.

Perhaps add 'TR' into the ignore elements list?

Scott

Change History (3)

comment:1 Changed 12 years ago by Martin Kou

Keywords: delete removed
Resolution: fixed
Status: newclosed

Fixed with [940].

Click here for more info about our SVN system.

comment:2 Changed 12 years ago by Scott McNaught

Resolution: fixed
Status: closedreopened

I noticed you wrote in the SVN change log that "it should be deleting the character at the next cell instead".

Are you sure that this functionality is the most intuitive?

I would have thought that once the caret is at the end of a cell, it should not delete any more.

I can see this new functionality having unexpected results in large / full page designs made up of tables.

Also I know I sometimes do this... But to delete the entire contents of a cell I sometimes click at the start and just hold down delete until empty. Wouldn't want it to spill over into other cells.

I realise that I suggested adding it to the "Ignore" list, but now I think about it, doesn't produce a desired result.

comment:3 Changed 12 years ago by Martin Kou

Resolution: fixed
Status: reopenedclosed

Oh yes, spilling over the next cell isn't really the best thing to do here. Word or OpenOffice.org don't do that as well.

I've added an extra check in [941] so the deletion wouldn't spill over or merge rows.

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