Opened 11 years ago

Closed 10 years ago

#10666 closed Bug (fixed)

Cross frame problems

Reported by: Stig Runar Vangen Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 4.2.2
Component: General Version: 4.2
Keywords: IBM Cc: stig@…, monahant@…, satya_minnekanti@…

Description

I'm using CkEditor in a GWT integration. This worked well until I just tried to update to the latest version 4.2 from version 4.0.1. I tracked this problem down to the isArray method in the tools.js file. The instanceof method works if you receive data from the same frame as where you are using the editor. When you send an object to an another frame, the instanceof Array method will no longer work. More details on this problem, and how to solve it is described here:

http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/

In short, this seems to be the best way to detect if an object is an array:

function isArray(o) {

return Object.prototype.toString.call(o) === '[object Array]';

}

I should also probably mention that GWT always loads all code through an iframe, which makes the current editor incompatible with a GWT environment.

Change History (7)

comment:1 Changed 11 years ago by Stig Runar Vangen

Cc: stig@… added

comment:2 Changed 10 years ago by Teresa Monahan

Cc: monahant@… added
Keywords: IBM added

comment:3 Changed 10 years ago by Teresa Monahan

This issue also occurs in some of our products and is currently a blocking issue for upgrading to CKEditor 4.2. Can you please prioritize this issue for an upcoming release?

comment:4 Changed 10 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added

cc

comment:5 Changed 10 years ago by Frederico Caldeira Knabben

Keywords: frame array instanceof removed
Milestone: CKEditor 4.2.2
Owner: set to Frederico Caldeira Knabben
Status: newreview

@stigrv, thanks for the suggestion. It should not be a big deal to change this, in fact.

Pushed t/10666@cksource.

comment:6 Changed 10 years ago by Piotrek Koszuliński

Status: reviewreview_passed

comment:7 Changed 10 years ago by Piotrek Koszuliński

Resolution: fixed
Status: review_passedclosed

Fixed with git:7cd0b1c.

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