Opened 14 years ago

Closed 11 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:

  1. Open the file 'table.html' in FF, select the table from 'For users:' to the last record in the table.
  2. Paste the content(Ctrl + v) in ckeditor opened in IE7
  3. Press 'Enter' immediately after it (see ckeditor1.jpg from the attached files)
  4. Browser error appears (see error_message.jpg from the attached parts)

Attachments (4)

table.html (3.6 KB) - added by tzweteto 14 years ago.
The html code for the table that is copied
ckeditor1.jpg (211.7 KB) - added by tzweteto 14 years ago.
The browser with the table pasted and the error in the left corner
error_message.jpg (64.9 KB) - added by tzweteto 14 years ago.
The displayed error message
5413.patch (449 bytes) - added by Tobiasz Cudnik 14 years ago.

Download all attachments as: .zip

Change History (15)

Changed 14 years ago by tzweteto

Attachment: table.html added

The html code for the table that is copied

Changed 14 years ago by tzweteto

Attachment: ckeditor1.jpg added

The browser with the table pasted and the error in the left corner

Changed 14 years ago by tzweteto

Attachment: error_message.jpg added

The displayed error message

comment:1 Changed 14 years ago by Garry Yao

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 14 years ago by brooks

Owner: set to brooks
Status: newassigned

comment:3 Changed 14 years ago by brooks

Owner: brooks deleted
Status: assignednew

comment:4 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4CKEditor 3.5

comment:5 Changed 14 years ago by Tobiasz Cudnik

Owner: set to Tobiasz Cudnik
Status: confirmedassigned

Changed 14 years ago by Tobiasz Cudnik

Attachment: 5413.patch added

comment:6 Changed 14 years ago by Tobiasz Cudnik

Status: assignedreview

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 14 years ago by Sa'ar Zac Elias

Status: reviewreview_passed

comment:8 Changed 14 years ago by Tobiasz Cudnik

Resolution: fixed
Status: review_passedclosed

Fixed with [5854].

comment:9 Changed 13 years ago by Garry Yao

Resolution: fixed
Status: closedreopened

The fix doesn't resovle the issue, reverted with [7239].

comment:10 Changed 13 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4.1

comment:11 Changed 11 years ago by Piotrek Koszuliński

Resolution: fixed
Status: reopenedclosed

I cannot reproduce this issue anymore. Code that handles pasting was rewritten in 90% percentage since this issue was reported.

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