Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#1081 closed Bug (fixed)

Restore table with undo deletes body element and causes javascript error

Reported by: Jon Håvard Gundersen Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed IE Cc:



  1. Create a table
  2. Move the cursor to the paragraph above the table
  3. Press "del" to delete the table
  4. Press "CTRL-Z" to restore the table
  5. Javascript error because of body element beeing deleted

Tested in Nightly build with IE7

The bug does not seem to apply when the table is deleted as a control object (selected and then deleted)

Change History (5)

comment:1 Changed 17 years ago by Martin Kou

Keywords: Confirmed IE added
Milestone: FCKeditor 2.5
Version: SVN

Confirmed on IE, the bug does not occur in Firefox.

comment:2 Changed 17 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:3 Changed 17 years ago by Martin Kou

The error doesn't occur in 2.4.3, and I've traced the cause of the error to the changeset [617]. Before [617], the error does not occur.

comment:4 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

Fixed with [713].

The real culprit to the bug was not [617] though, it was the enter key system that was faulty. I found in my investigations that after pressing Delete in step 3, the contents of the <table> tag (i.e. the <tbody>, <tr>, <td> tags) would be brought into the document, and if you move the cursor around just after step 3, you would find there are a few new lines at where the table used to be (these new lines are actually <tr> tags). Deleting one of these new lines would delete the <body> tag, and invoke the error without performing step 4 and step 5.

So the real problem here is that the Delete key handling logic has incorrectly brought the contents of the <table> block into the document, and having a <tbody> inside <body> creates some really weird behaviors. [713] fixes the bug by making the Delete key delete the whole table with its contents.

comment:5 Changed 17 years ago by Frederico Caldeira Knabben

Nice job Martin!

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