#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: |
Description
Scenario:
- Create a table
- Move the cursor to the paragraph above the table
- Press "del" to delete the table
- Press "CTRL-Z" to restore the table
- 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
Keywords: | Confirmed IE added |
---|---|
Milestone: | → FCKeditor 2.5 |
Version: | → SVN |
comment:2 Changed 17 years ago by
Owner: | set to Martin Kou |
---|---|
Status: | new → assigned |
comment:3 Changed 17 years ago by
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
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.
Confirmed on IE, the bug does not occur in Firefox.