Opened 11 years ago
Closed 11 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
Cc: | stig@… added |
---|
comment:2 Changed 11 years ago by
Cc: | monahant@… added |
---|---|
Keywords: | IBM added |
comment:3 Changed 11 years ago by
comment:5 Changed 11 years ago by
Keywords: | frame array instanceof removed |
---|---|
Milestone: | → CKEditor 4.2.2 |
Owner: | set to Frederico Caldeira Knabben |
Status: | new → review |
@stigrv, thanks for the suggestion. It should not be a big deal to change this, in fact.
Pushed t/10666@cksource.
comment:6 Changed 11 years ago by
Status: | review → review_passed |
---|
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with git:7cd0b1c.
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?