Ticket #7748 (closed Bug: fixed)

Opened 4 years ago

Last modified 9 months ago

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

Reported by: wwalc 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

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

Change History

Changed 4 years ago by wwalc

comment:1 Changed 4 years ago by wwalc

  • Cc swmgmt@… added

comment:2 Changed 4 years ago by j.swiderski

  • Status changed from new to confirmed
  • Version set to 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 3 years ago by wwalc

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 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

Changed 3 years ago by wwalc

comment:4 Changed 3 years ago by wwalc

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 9 months ago by Reinmar

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

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