﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
13772	Contents appear unstyled on Firefox when setData() called immediately	Dusty Jewett		"== Steps to reproduce ==

1. Initialize editor
2. listen for 'instanceReady'
3. call setData()

Example here:
https://jsbin.com/vaqexu/2/edit?html,js,output

== Expected result ==

Content appears styled.


== Actual result ==

Contents not styled. contents.css not loaded as expected.

The example uses a link to S3 which is fairly variable in it's response rates.  When the response rate is > 100ms, the contents will not be styled. The example jsbin has a timeout you can adjust to see that the successful styling is directly related to the response times.

I'm guessing that the success rates for < 100ms have to do with the setTimeout(,100) in wysiwygarea's initialization.


== Hypothesis ==

1. I believe that Firefox is canceling the open requests when ckeditor writes to the iframe.  
2. I believe that Firefox de-duplicates requests per iframe, ensuring that if the same document is referenced multiple times, it's only retrieved once.
3. I believe that the canceling is actually asynchronous, such that the second time we write the content to the page, it de-duplicates it first, and then the request is canceled.
4. When monitoring network traffic through Charles Proxy (it's awesome, you should try it if you haven't), it will report that the connection was closed by the client.

== Possible Fix == 

Append cache-busting query string to css url. See: 
https://jsbin.com/woyeze/edit?html,js,output



== Other details (browser, OS, CKEditor version, installed plugins) ==

Firefox 41, Windows, OSX & Linux
"	Bug	confirmed	Normal		General	4.0		Firefox	
