Opened 8 years ago

Closed 8 years ago

#3894 closed Bug (fixed)

[FF3] Script load and editor init problem

Reported by: Damian Owned by: Garry Yao
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: General Version:
Keywords: IBM Confirmed Review+ Cc:

Description (last modified by Martin Kou)

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 Damian 8 years ago.
3894.patch (1.8 KB) - added by Garry Yao 8 years ago.
3894_2.patch (1.8 KB) - added by Garry Yao 8 years ago.
3894_3.patch (2.0 KB) - added by Garry Yao 8 years ago.

Download all attachments as: .zip

Change History (17)

Changed 8 years ago by Damian

Attachment: test.html added

comment:1 Changed 8 years ago by Garry Yao

Description: modified (diff)
Keywords: Confirmed added
Resolution: fixed
Status: newassigned

comment:2 Changed 8 years ago by Martin Kou

Description: modified (diff)
Owner: set to Martin Kou
Status: assignednew

comment:3 Changed 8 years ago by Martin Kou

Owner: changed from Martin Kou 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 8 years ago by Garry Yao

Status: newassigned

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 8 years ago by Garry Yao

Attachment: 3894.patch added

comment:5 Changed 8 years ago by Garry Yao

Keywords: Review? added

comment:6 Changed 8 years ago by Garry Yao

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

comment:7 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

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

Changed 8 years ago by Garry Yao

Attachment: 3894_2.patch added

comment:8 Changed 8 years ago by Garry Yao

Keywords: Review? added; Review- removed

comment:9 Changed 8 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 Changed 8 years ago by Damian

Same problem on IE6.

Changed 8 years ago by Garry Yao

Attachment: 3894_3.patch added

comment:11 in reply to:  10 Changed 8 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 8 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:13 Changed 8 years ago by Garry Yao

Status: assignedclosed

Fixed with [3829].

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