Opened 14 years ago

Closed 11 years ago

#7748 closed Bug (fixed)

enterMode BR: range.pasteHTML and "Invalid argument" errors

Reported by: Wiktor Walc Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc: swmgmt@…

Description

The attached sample can be used to trigger "Invalid argument" errors in CKEditor.

Bug 1

Invalid argument. selection/plugin.js line 775

  • Press "Select All" or Ctrl + A
  • Press "Insert Span" button

Bug 2

Invalid argument. core/dom/node.js line 240

  • Select word "This" (using arrow keys, to make sure that surrounding white characters are not selected)
  • Press "Insert Span" button

Attachments (11)

pasteHTML.html (2.1 KB) - added by Wiktor Walc 14 years ago.
1_1.png (168.9 KB) - added by Wiktor Walc 13 years ago.
1_2.png (139.4 KB) - added by Wiktor Walc 13 years ago.
1_3.png (126.4 KB) - added by Wiktor Walc 13 years ago.
1_4.png (127.7 KB) - added by Wiktor Walc 13 years ago.
2_1.png (141.1 KB) - added by Wiktor Walc 13 years ago.
2_2.png (143.7 KB) - added by Wiktor Walc 13 years ago.
2_3.png (148.8 KB) - added by Wiktor Walc 13 years ago.
3_1.png (79.8 KB) - added by Wiktor Walc 13 years ago.
3_2.png (161.2 KB) - added by Wiktor Walc 13 years ago.
3_3.png (184.3 KB) - added by Wiktor Walc 13 years ago.

Download all attachments as: .zip

Change History (16)

Changed 14 years ago by Wiktor Walc

Attachment: pasteHTML.html added

comment:1 Changed 14 years ago by Wiktor Walc

Cc: swmgmt@… added

comment:2 Changed 14 years ago by Jakub Ś

Status: newconfirmed
Version: 3.0

True for Webkit, Gecko and Opera from CKEditor version 3.0. No errors are thrown in IE.

Messages from DOM inspectors:
Dragonfly: Cannot convert 'oEditor.document.$.selection' to object
Firebug: oEditor.document.$.selection is undefined
Chrome: Uncaught TypeError: Cannot call method 'createRange' of undefined
Safari: TypeError: Result of expression 'oEditor.document.$.selection' [undefined] is not an object.

comment:3 Changed 13 years ago by Wiktor Walc

Still reproducible in 3.6.2, I'm attaching a few screenshots of both issues that can be reproduced using attached pasteHTML.html sample.

Changed 13 years ago by Wiktor Walc

Attachment: 1_1.png added

Changed 13 years ago by Wiktor Walc

Attachment: 1_2.png added

Changed 13 years ago by Wiktor Walc

Attachment: 1_3.png added

Changed 13 years ago by Wiktor Walc

Attachment: 1_4.png added

Changed 13 years ago by Wiktor Walc

Attachment: 2_1.png added

Changed 13 years ago by Wiktor Walc

Attachment: 2_2.png added

Changed 13 years ago by Wiktor Walc

Attachment: 2_3.png added

Changed 13 years ago by Wiktor Walc

Attachment: 3_1.png added

Changed 13 years ago by Wiktor Walc

Attachment: 3_2.png added

Changed 13 years ago by Wiktor Walc

Attachment: 3_3.png added

comment:4 Changed 13 years ago by Wiktor Walc

Case 1 investigation with debug: screenshots 1_1-1_4 and 2_1-2_3 (This error happens in selection/plugin.js, method getBoundaryInformation(). The child node doesn’t have a valid nodeValue)

Case 2 investigation with debug: screenshots 3_1-3_3

Screenshots and description were provided by original reporter, cc-ed to this ticket.

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

Resolution: fixed
Status: confirmedclosed

Both TCs are not reproducible on IEs. And they never were on other browsers because this code uses IE specific API, so it always fails.

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