This project is archived and is in readonly mode.

Explorer 6 fails to load DOM when a page first opened in 1.3 but no problem in 1.2.5
Reported by dave pilbeam | January 27th, 2011 @ 12:39 PM | in 1.4.0 (closed)
In 1.3, Explorer 6 fails to load DOM when a page is first opened
- There is no such issue with 1.2.5
- on refreshing the page the DOM loads correctly
- Windows 7 IE6 emulator mode and Windows 7 virtual pc xp-mode Explorer 6 load correctly
After my own tests (see below for jsfiddle etc), I was directed
to use the test page at:
http://mootools.wienk.name/core/Specs/1.3client/Utilities/DOMReady.php
Results:
i/ Win 2000 on PC - Firefox 3.6: ==PASSES==
http://www.parknet-hosting.co.uk/test/win2000_firefox-36.gif
ii/ - Win 2000 on PC - Genuine Explorer 6.0.26: ==FAILS==
http://www.parknet-hosting.co.uk/test/win2000_explorer-60.gif
iii/ - XP (SP2) on PC - Genuine Explorer 6.0.29: ==FAILS==
http://www.parknet-hosting.co.uk/test/winXP_explorer6-0.gif
iv/ - Windows 7 on PC - IETester Emulator Explorer 6:
==FAILS==
http://www.parknet-hosting.co.uk/test/win7-ietester_explorer6.gif
v/ - Windows 7 on PC - XP Mode Virtual PC Explorer 6:
==FAILS==
http://www.parknet-hosting.co.uk/test/win7-xpmode_explorer6.gif
My own previous tests:
1/ - Win 2000 on PC - Genuine Explorer 6.0.26
http://jsfiddle.net/davepilbeam/Lyh55/:
Error: line 136: "Library not registered"
http://www.parknet-hosting.co.uk/test/test13-A.html:
Error: line 5: "Undefined is null or not an object"
http://www.parknet-hosting.co.uk/test/test125-A.html:
loads ok
2/ - XP (SP2) on PC - Genuine Explorer 6.0.29
http://jsfiddle.net/davepilbeam/Lyh55/:
loads ok (although is this actually 'a first load'?)
http://www.parknet-hosting.co.uk/test/test13-A.html:
Error: line 5: "Undefined is null or not an object"
http://www.parknet-hosting.co.uk/test/test125-A.html:
loads ok
3/ - Vista on PC - IETester Emulator Explorer 6
http://jsfiddle.net/davepilbeam/Lyh55/:
Error: line 25: Object doesn't support this property or method
http://www.parknet-hosting.co.uk/test/test13-A.html:
Error: line 5: "Undefined is null or not an object"
http://www.parknet-hosting.co.uk/test/test125-A.html:
loads ok
4/ - Windows 7 on PC - IETester Emulator Explorer 6
http://jsfiddle.net/davepilbeam/Lyh55/:
Error: line 230: "Access is denied"
http://www.parknet-hosting.co.uk/test/test13-A.html:
loads ok
http://www.parknet-hosting.co.uk/test/test125-A.html:
loads ok
5/ - Windows 7 on PC - XP Mode Virtual PC Explorer 6
http://jsfiddle.net/davepilbeam/Lyh55/:
loads ok (see 2 above)
http://www.parknet-hosting.co.uk/test/test13-A.html:
loads ok
http://www.parknet-hosting.co.uk/test/test125-A.html:
loads ok
How did I notice?
Eagerly upgrading to 1.3 I managed to upset a couple of core public
sector clients marooned by their IT departments on XP and Explorer
6..
Moral of story?
By the looks of this so far, you can't trust an emulator..
Comments and changes to this ticket
-
Arian January 27th, 2011 @ 08:39 PM
- Assigned user set to Thomas Aylott
-
dave pilbeam February 18th, 2011 @ 02:48 PM
Okay, I have a first hack at a fix (that isn't either document.refresh or retreat to 1.2.5):
Basically, substituting domready with LAB - http://labjs.com/ - works without error in ALL the explorer 6 variants listed above:
http://jsfiddle.net/davepilbeam/LTfZP/
http://www.parknet-hosting.co.uk/test/testLAB.html
NB
-works with LAB loaded externally or inline-opera 9 won't complete if domready is still used
-jsfiddle interface on Win2000 ie6 produces 'library not registered error' on first load
-remember, emulators work ok anyway
-
dave pilbeam February 22nd, 2011 @ 10:32 AM
I've got a proper definition/solution of the problem - a guidelines issue resulting from changed behaviour rather than a bug, perhaps:
If the 'Content-Type' meta tag does not appear BEFORE the mootools core 'script' tag in the document, then 1.3 fails to detect DOM loaded correctly in genuine Explorer 6 on XP/WIN2000 until the page is refreshed.
This does not happen in 1.25 and below.'Content-Type' before 'script' - new 1.3 test = WORKS
http://www.parknet-hosting.co.uk/test/test13meta.html
'Content-Type' after 'script' - Original 1.3 test = FAILS
http://www.parknet-hosting.co.uk/test/test13.html
'Content-Type' after 'script' - Original 1.25 test = WORKS
-
Arian February 22nd, 2011 @ 08:29 PM
- State changed from new to open
- Milestone set to 1.3.1
- Milestone order changed from 875 to 0
This seems really weird.
I recreated your test with a more visual fail/pass (instead of wizard.png / wizard.gif ;)):
http://mootools.net/test/DOMReady-bug-1156/test13meta.html
http://mootools.net/test/DOMReady-bug-1156/test13.html
http://mootools.net/test/DOMReady-bug-1156/test125.htmlAnd indeed, the test13.html test, where the content-type meta tag is after the
<script>
tags errors only on the first time the page was loaded.The best thing for now is obviously put the meta tag before the script tags...
-
Arian February 22nd, 2011 @ 09:21 PM
It seems when you put the script before the content-type meta tag in IE6, the script gets executed twice.
See in IE6:
http://mootools.net/test/DOMReady-bug-1156/executeTwice.htmlIf this is really the case, I'm not sure we have to this error, because mootools would load twice also, which is itself a bad thing.
Also other browsers start rendering the page, then see the content-type meta tag and begin again. This is of course bad for your performance as well and that is why it's generally better to set it as fast as possible, either on the server or at the top of the head tag.
-
Christoph Pojer February 22nd, 2011 @ 09:26 PM
- Assigned user changed from Thomas Aylott to Christoph Pojer
I wonder if a note in the documentation is enough or if we can safely/easily fix this issue. Is there any reason to include scripts before the content-type? In HTML5 documents I suppose the content-type is one of the first attribs anyway, isn't it?
-
Thomas Aylott February 23rd, 2011 @ 02:04 AM
(from [bf7e1cacacc2e2950674ace9a8a8e3b58c2a975b]) Adding a note to the DOMReady documentation for an IE6 bug [#1156] https://github.com/mootools/mootools-core/commit/bf7e1cacacc2e29506...
-
Christoph Pojer February 23rd, 2011 @ 02:06 AM
- Milestone changed from 1.3.1 to 1.4.0
- Milestone order changed from 14 to 0
I have added a note to the documentation. Given the small testcase arian has provided I don't see a way to fix this (will postpone to 1.3.2). It seems that 1.2.5 was loaded twice with no side-effects and 1.3 doesn't like this. We do not support multiple versions of MooTools on the same page so this can be considered an unsupported feature or a bug that was fixed in 1.3.
Please always just put the content-type on top to not confuse our beloved Internet Explorer browser.
-
Christoph Pojer April 16th, 2011 @ 09:52 AM
- State changed from open to wontfix
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
-
1156 Explorer 6 fails to load DOM when a page first opened in 1.3 but no problem in 1.2.5 (from [bf7e1cacacc2e2950674ace9a8a8e3b58c2a975b]) Adding ...