Ticket #5413 (closed Bug: fixed)

Opened 4 years ago

Last modified 13 months ago

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

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

Change History

Changed 4 years ago by tzweteto

The html code for the table that is copied

Changed 4 years ago by tzweteto

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

Changed 4 years ago by tzweteto

The displayed error message

comment:1 Changed 4 years ago by garry.yao

  • Keywords Confirmed added
  • Milestone set to 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 4 years ago by brooks

  • Owner set to brooks
  • Status changed from new to assigned

comment:3 Changed 4 years ago by brooks

  • Status changed from assigned to new
  • Owner brooks deleted

comment:4 Changed 4 years ago by fredck

  • Milestone changed from CKEditor 3.4 to CKEditor 3.5

comment:5 Changed 4 years ago by tobiasz.cudnik

  • Owner set to tobiasz.cudnik
  • Status changed from confirmed to assigned

Changed 4 years ago by tobiasz.cudnik

comment:6 Changed 4 years ago by tobiasz.cudnik

  • Status changed from assigned to 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 4 years ago by Saare

  • Status changed from review to review_passed

comment:8 Changed 4 years ago by tobiasz.cudnik

  • Status changed from review_passed to closed
  • Resolution set to fixed

Fixed with [5854].

comment:9 Changed 3 years ago by garry.yao

  • Status changed from closed to reopened
  • Resolution fixed deleted

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

comment:10 Changed 3 years ago by fredck

  • Milestone CKEditor 3.4.1 deleted

comment:11 Changed 13 months ago by Reinmar

  • Status changed from reopened to closed
  • Resolution set to fixed

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy