duckfly-tw / ie7-js

A JavaScript library to make MSIE behave like a standards-compliant browser.
http://code.google.com/p/ie7-js
0 stars 0 forks source link

IE6 bug using IE9 script #319

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using this code:

<!--[if lt IE 9]>
    <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
<![endif]-->

I opened IE6 and it has the following error:

Char: 28214
Error: Invalid argument.
Code: 0

I don't know what the problem is but it is affecting my other javascript. I 
removed the ie7-js script
 and there were no errors and my javascript worked fine, so I know that there is a problem in this code.

Original issue reported on code.google.com by misbehav...@gmail.com on 14 Apr 2011 at 4:31

GoogleCodeExporter commented 9 years ago
I also noticed the same issue affects IE7 and IE8 (running in compatability 
view). The message is a little different for IE 8 but it's still the same:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 
InfoPath.2)
Timestamp: Thu, 14 Apr 2011 16:57:43 UTC

Message: Invalid argument.
Line: 6
Char: 28214
Code: 0
URI: http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js

Original comment by misbehav...@gmail.com on 14 Apr 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Seeing a similar error with the ie8 script:

Line: 7
Char: 28206
Error: Invalid Argument
Code: 0

Original comment by s...@superdeluxesam.com on 12 May 2011 at 10:00

GoogleCodeExporter commented 9 years ago
ie9js g.runtimeStyle[a]=g.parentElement.currentStyle[a]
ie8js f.runtimeStyle[a]=f.parentElement.currentStyle[a]

Original comment by fun...@gmail.com on 4 Jun 2011 at 5:53

GoogleCodeExporter commented 9 years ago
I patched this using a conditional in line 2079:

if (element.parentElement.currentStyle[propertyName] !== undefined)
            element.runtimeStyle[propertyName] = element.parentElement.currentStyle[propertyName];

It doesn't really fix the problem, it just prevents the error from triggering 
thus allowing your javascript to run.

Attaching fixed source and minified file.

Original comment by ham...@gmail.com on 22 Jun 2011 at 4:23

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I am experiencing this in IE7 mode (under IE9), even with that conditional fix. 

Original comment by mastaste...@gmail.com on 12 Sep 2011 at 12:16

GoogleCodeExporter commented 9 years ago
ham... your patch fixed the problem for me as well. Thank you.

Original comment by eime...@gmail.com on 25 Apr 2012 at 4:19