History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: AJF-31
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Matthieu Lux
Reporter: Matthieu Lux
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Archetype

IE "Operation Aborted"

Created: 22/Mar/08 01:56 AM   Updated: 18/Jun/08 10:36 AM
Component/s: None
Affects Version/s: 0.1.5
Fix Version/s: 0.8.0-beta, 0.8.0

Environment: A Web 1.0 project and IE


 Description  « Hide
There is a very huge bug in IE : http://weblogs.asp.net/infinitiesloop/archive/2006/11/02/Dealing-with-IE-_2600_quot_3B00_Operation-Aborted_2600_quot_3B002E00_-Or_2C00_-how-to-Crash-IE.aspx

There is two problems with that :
If the header is wrong formated for IE : like base tag written <base href=""/> wich is not supported by IE (lol) Archetype's addJS method crash IE.
Basic solution to deal with that is this modification, in addJS method :
    var archetypeElement = document.getElementById("archetype");
    var container = archetypeElement.parentNode;
    container.appendChild(script);
        //var head = document.getElementsByTagName("head")[0];
        //head.appendChild(script);

Once more this solution had to be perfected.

The second behavious si very much more difficult to find :
If the content of the page is big and contain script tag (berk :p) it appends that archetype.js is loaded before the loading of the end of the page content. And if Archetype do a addJS before a script tag in the page content, crash, same bug.

To deal with that we need to wait (only with IE) the end of the page content loading before launching Archetype.
This code is a solution but also had to be perfected :

if (document.all && !window.opera){ //Crude test for IE
//Define a "blank" external JavaScript tag
  document.write('<script type="text/javascript" id="contentloadtag" defer="defer" src="javascript:void(0)"><\/script>')
  var contentloadtag=document.getElementById("contentloadtag")
  contentloadtag.onreadystatechange=function(){
    if (this.readyState=="complete")
      Archetype.load();
  }
} else {
Archetype.load();
}


 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Florian Traverse - 26/Mar/08 02:51 PM
I've patched Archetype.load with this code. It has not been tested on IE right now

Florian Traverse - 01/Apr/08 02:23 PM
has been commited but seems to have some problems at least with IE7 more test to come

Florian Traverse - 01/Apr/08 06:01 PM

Matthieu Lux - 08/Apr/08 04:54 PM
Waiting IE dom loading with code from the blog and adding elements at the same level as the script tag of archetype seems resolve all problems.

Archetype always wait dom loading event in each browser.

If problem re-appear, just re-open the bug but we think it's ok now.