Opened 9 years ago
Closed 6 years ago
#5413 closed Bug (fixed)
Browser error after pasting html table in ckeditor
| Reported by: | tzweteto | Owned by: | Tobiasz Cudnik |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | Core : Pasting | Version: | 3.2 |
| Keywords: | Cc: |
Description
When pasting html table copied from FF3 to ckeditor opened in IE 7 the following browser error is received:
Line: 16
Char: 1462
Message: Unexpected call to method or property access.
Code: 0
URI: http://nightly.ckeditor.com/5319/_samples/replacebyclass.html
(see error_message.jpg from the attached parts)
Steps to reproduce:
- Open the file 'table.html' in FF, select the table from 'For users:' to the last record in the table.
- Paste the content(Ctrl + v) in ckeditor opened in IE7
- Press 'Enter' immediately after it (see ckeditor1.jpg from the attached files)
- Browser error appears (see error_message.jpg from the attached parts)
Attachments (4)
Change History (15)
Changed 9 years ago by
| Attachment: | table.html added |
|---|
Changed 9 years ago by
| Attachment: | ckeditor1.jpg added |
|---|
The browser with the table pasted and the error in the left corner
comment:1 Changed 9 years ago by
| Keywords: | Confirmed added |
|---|---|
| Milestone: | → CKEditor 3.4 |
The problem is that partial table contents like below is corrupted in IE, result in distorted DOM structure that's error prone, we should be looking for fixes in our own parser before sending it to browser.
var table = '<tr><td>cell</td></tr>'; element.innerHTML = table; element.lastChild.nodeName; // "/tr"
Note that FF also give different result by ignoring all table cell elements.
comment:2 Changed 9 years ago by
| Owner: | set to brooks |
|---|---|
| Status: | new → assigned |
comment:3 Changed 9 years ago by
| Owner: | brooks deleted |
|---|---|
| Status: | assigned → new |
comment:4 Changed 9 years ago by
| Milestone: | CKEditor 3.4 → CKEditor 3.5 |
|---|
comment:5 Changed 9 years ago by
| Owner: | set to Tobiasz Cudnik |
|---|---|
| Status: | confirmed → assigned |
Changed 9 years ago by
| Attachment: | 5413.patch added |
|---|
comment:6 Changed 9 years ago by
| Status: | assigned → review |
|---|
I think we should mask pasting errors until #5309, which will bring DTD aware pasting.
After the patch table is pasted correctly, so masking JS error seems to enough.
comment:7 Changed 9 years ago by
| Status: | review → review_passed |
|---|
comment:8 Changed 9 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review_passed → closed |
Fixed with [5854].
comment:9 Changed 8 years ago by
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
The fix doesn't resovle the issue, reverted with [7239].
comment:10 Changed 8 years ago by
| Milestone: | CKEditor 3.4.1 |
|---|
comment:11 Changed 6 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
I cannot reproduce this issue anymore. Code that handles pasting was rewritten in 90% percentage since this issue was reported.

The html code for the table that is copied