Opened 7 years ago

Closed 7 years ago

#3894 closed Bug (fixed)

[FF3] Script load and editor init problem

Reported by: damo Owned by: garry.yao
Priority: High Milestone: CKEditor 3.0
Component: General Version:
Keywords: IBM Confirmed Review+ Cc:

Description (last modified by martinkou)

Please see attached test case. You must edit the file and replace the url to your ckeditor.js file (not ckeditor_source.js).

When the editor is created after loading the page, it seems to hang and not call instanceReady.

If the first instance is destroyed and subsequent ones created, they will initialize correctly.

This problem is only on FF3. Tested on FF2 and IE6 without a problem.

Attachments (4)

test.html (2.8 KB) - added by damo 7 years ago.
3894.patch (1.8 KB) - added by garry.yao 7 years ago.
3894_2.patch (1.8 KB) - added by garry.yao 7 years ago.
3894_3.patch (2.0 KB) - added by garry.yao 7 years ago.

Download all attachments as: .zip

Change History (17)

Changed 7 years ago by damo

comment:1 Changed 7 years ago by garry.yao

  • Description modified (diff)
  • Keywords Confirmed added
  • Resolution set to fixed
  • Status changed from new to assigned

comment:2 Changed 7 years ago by martinkou

  • Description modified (diff)
  • Owner set to martinkou
  • Status changed from assigned to new

comment:3 Changed 7 years ago by martinkou

  • Owner changed from martinkou to garry.yao

I've just talked to Garry about this. He was working on this ticket but he closed it as fixed by mistake. Re-assigning ticket back to Garry.

comment:4 Changed 7 years ago by garry.yao

  • Status changed from new to assigned

The problem here is 'onload' event is never fired when we write data to the editor frame data. As Damian noticed, it's actually a regression of [3794], but we don't really need to revert anything of it, because the fixing is targeting other bugs.
I guess the root cause is that Firefox is trying to optimize by loading the iframe as soon as the 'src' attribute is assigned. Which cause the following wrong execution sequence in this browser:

  1. iframe is created.
  2. src attribute is assigned.
  3. document writing begin.
  4. document closed.( Checking to fire 'onload' here, but iframe is not added yet )
  5. iframe is added to main frame.

An simple workaround could be found to swap 4 and 5, then we could get the right result, a path will come soon.

Changed 7 years ago by garry.yao

comment:5 Changed 7 years ago by garry.yao

  • Keywords Review? added

comment:6 Changed 7 years ago by garry.yao

Tested in all browsers with both 'inline' and 'on-demand' mode.

comment:7 Changed 7 years ago by fredck

  • Keywords Review- added; Review? removed

Please include the setTimeout time value (zero "0").

Changed 7 years ago by garry.yao

comment:8 Changed 7 years ago by garry.yao

  • Keywords Review? added; Review- removed

comment:9 Changed 7 years ago by garry.yao

  • Keywords Review- added; Review? removed

Oops, after the patch, IE8 will display the iframe as page not found. Let's dedicate it to Firefox for safety.

comment:10 follow-up: Changed 7 years ago by damo

Same problem on IE6.

Changed 7 years ago by garry.yao

comment:11 in reply to: ↑ 10 Changed 7 years ago by garry.yao

  • Keywords Review? added; Review- removed

Replying to damo:

Same problem on IE6.

I don't have problem with IE6 after the previous path, anyway I've dedicated to gecko now.

comment:12 Changed 7 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:13 Changed 7 years ago by garry.yao

  • Status changed from assigned to closed

Fixed with [3829].

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy